Ignore:
Timestamp:
Aug 20, 2010, 7:49:45 AM (14 years ago)
Author:
mmc
Message:

Fixed the Scroller to favor keeping the scrollbar on screen, so we don't
get stuck in a mode where they disappear.

Fixed the Panes widget to do the layout with reqwidth instead of width.
When the widget first appears, the sashes have a width of 1 pixel, but
they immediately show up as 10 pixels, so the layout was off.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/scroller.tcl

    r1742 r1865  
    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.