Changeset 1908 for branches/blt4


Ignore:
Timestamp:
Sep 10, 2010 8:23:41 AM (14 years ago)
Author:
gah
Message:
 
Location:
branches/blt4/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/gui/scripts/bugreport.tcl

    r1905 r1908  
    8181        pack .bugreport.comments -after .bugreport.details \
    8282            -expand yes -fill both -padx 8 -pady {0 8}
     83
     84        update idletasks
     85        set w [winfo reqwidth .bugreport]
     86        set h [winfo reqheight .bugreport]
     87        set x [expr {([winfo screenwidth .bugreport]-$w)/2}]
     88        if {$x < 0} {set x "+0"} else {set x "+$x"}
     89        set y [expr {([winfo screenheight .bugreport]-$h)/2}]
     90        if {$y < 0} {set y "-0"} else {set y "+$y"}
     91
     92        wm geometry .bugreport $x$y
     93        raise .bugreport
    8394        return
    8495    }
  • branches/blt4/gui/scripts/scroller.tcl

    r1852 r1908  
    267267        x {
    268268            if {$state} {
    269                 if {![_lock active x]} {
    270                     # grid $itk_component(xsbar) -row 1 -column 0 -sticky ew
    271                     if {$col == 1} {
    272                         grid $itk_component(xsbar) -row $row -column $col -sticky ew
    273                     }
     269                if {$col == 1} {
     270                    grid $itk_component(xsbar) -row $row -column $col -sticky ew
    274271                }
    275272            } else {
    276                 grid forget $itk_component(xsbar)
    277                 _lock set x
     273                # handle the lock on the "forget" side, so scrollbar
     274                # tends to appear, rather than disappear
     275                if {![_lock active x]} {
     276                    grid forget $itk_component(xsbar)
     277                    _lock set x
     278                }
    278279            }
    279280        }
    280281        y {
    281282            if {$state} {
    282                 if {![_lock active y]} {
    283                     # grid $itk_component(ysbar) -row 0 -column 1 -sticky ns
    284                     if {$row == 1} {
    285                         grid $itk_component(ysbar) -row $row -column $col -sticky ns
    286                     }
     283                if {$row == 1} {
     284                    grid $itk_component(ysbar) -row $row -column $col -sticky ns
    287285                }
    288286            } else {
    289                 grid forget $itk_component(ysbar)
    290                 _lock set y
     287                # handle the lock on the "forget" side, so scrollbar
     288                # tends to appear, rather than disappear
     289                if {![_lock active y]} {
     290                    grid forget $itk_component(ysbar)
     291                    _lock set y
     292                }
    291293            }
    292294        }
Note: See TracChangeset for help on using the changeset viewer.