#186 panedwindow [Bugs 1161543,1054117,1010941,795869,690169]

closed-fixed
Jeffrey Hobbs
9
2005-05-31
2005-02-16
Daniel South
No

fixed: when pane is given a height or a width, the
other did not auto-size to fit internal windows.
panedwindow .p -width 200
frame .f1 -height 50 -bg blue
.p add .f1
pack .p -fill both -expand 1

fixed: when a width is given to an internal window in
a horizontal pane (height for vertical), the internal
window doesn't auto-size its width to fit (default
stretch option is last).
panedwindow .p -width 200 -height 200
frame .f1 -width 50 -height 50 -bg blue
.p add .f1
pack .p -fill both -expand 1

fixed: sash placement when compressed together at
edge of pane.

fixed: calculation of stretch amount for internal
windows.
panedwindow .p -width 200 -height 200
frame .f1 -width 50 -bg red
frame .f2 -width 50 -bg green
frame .f3 -width 50 -bg blue
.p add .f1 .f2 .f3
pack .p -fill both -expand 1
then
.p paneconfigure .f2 -hide 1

now that that works, lets look at the tests.

split 24.29 into two tests, one with a dynamic sized
pane and one with a fixed size pane. Increased frame
widths to stop [wm minsize .] interferring (at least
on XP).

24.30 - 24.33 needed fixed width panes to stop them
resizing when an internal window was hidden. Same
frame size adjustment as for 24.29.

24.32 The last part of the result (ie 55 56) is not a
typo, pixels for stretching are distributed right to
left.

Discussion

  • Daniel South
    Daniel South
    2005-02-21

    • summary: panedwindow test failures patch [ Bug 1054117 ] --> panedwindow patch [ Bugs 1054117, 1010941, 795869 ]
     
  • Daniel South
    Daniel South
    2005-02-21

    Logged In: YES
    user_id=596509

    Patch, as it stood, resolved bug #1010941 and #795869.
    But while looking at these bugs i noticed some problems
    with drawing the sashes at the edges of the paned window,
    these have been fixed.
    Also noticed that the original design had the sash padding
    overlapping the internal border on the right but not on
    the left - made left consistent with right (the reverse is
    easier but IMO didn't look as good).
    Panes also now shrink leftmost first once all stretchable
    panes have reached 0 width.
    Still have some issues to sort out with regard to
    respecting minsize [bug #690169], and some weird sash-drag-
    resize issues. I wanted to get the basic placement and
    arrangement correct first before hacking into the sash
    drag code :)

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2005-02-22

    Logged In: YES
    user_id=72656

    Are you posting this patch as a work-in-progress, or do you
    think it is ready for applying and another patch would come
    later for respecting minsize [bug #690169]?

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2005-02-22

    Logged In: YES
    user_id=72656

    Also, this is an 8.5 patch only, or did you intend to have
    this correct issues in 8.4 as well?

     
  • Daniel South
    Daniel South
    2005-02-24

    Logged In: YES
    user_id=596509

    Although this patch passes all panedwindow tests, I would
    consider this to be a work-in-progress now :)

    The changes required to respect minsize will affect some
    of the pane arrangement logic currently used in this patch.

    Once I have resolved the remaining issues I know of, I'll
    look at what changes are required to backport. (A quick
    look suggests it just needs removal of the stretch and
    hide logic).

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2005-02-24

    Logged In: YES
    user_id=72656

    I will wait until I see a comment that you are comfy to see
    this commited to the head and/or 8.4 then.

     
  • Daniel South
    Daniel South
    2005-02-25

    • summary: panedwindow patch [ Bugs 1054117, 1010941, 795869 ] --> panedwindow patch [ Bugs 1054117, 1010941, 795869, 690169 ]
     
  • Daniel South
    Daniel South
    2005-02-25

    Logged In: YES
    user_id=596509

    OK, this should be ready for someone to evaluate...

    Reverted the change to sash overlapping panedwindow
    internal border and corrected RHS to match (although
    possible to do it makes the panesize calculations even
    more obtuse than they already are).

    Fixed bug 690169, now respects minsize. When shrinking the
    panedwindow, stretchable panes will shrink to their
    minsize proportional to their requested size, then panes
    will shrink from left -> right to minsize, then they'll
    pile up at the RHS. Use to following two scripts to see
    how they react (first script will work on 8.4).

    panedwindow .p -height 100
    frame .f1 -width 150 -bg red
    frame .f2 -width 100 -bg white
    frame .f3 -width 100 -bg blue
    frame .f4 -width 100 -bg green
    .p add .f1 -minsize 120
    .p add .f2 -minsize 30
    .p add .f3 -minsize 0
    .p add .f4 -minsize 50
    pack .p -fill both -expand 1

    panedwindow .p -height 100
    frame .f1 -width 100 -bg red
    frame .f2 -width 100 -bg white
    frame .f3 -width 100 -bg blue
    frame .f4 -width 100 -bg green
    .p add .f1 .f2 .f3 .f4 -stretch middle
    .p paneconfigure .f1 -minsize 50
    .p paneconfigure .f2 -minsize 70
    pack .p -fill both -expand 1

    backport for 8.4 attached as well.

     
  • Daniel South
    Daniel South
    2005-03-28

    • summary: panedwindow patch [ Bugs 1054117, 1010941, 795869, 690169 ] --> panedwindow [Bugs 1161543,1054117,1010941,795869,690169]
     
  • Daniel South
    Daniel South
    2005-03-28

    Logged In: YES
    user_id=596509

    Ready for commit.

    This also fixes bug 1161543, and a few other sash drag
    oddities I saw.

    Backport for 8.4 attached as well.

     
  • Daniel South
    Daniel South
    2005-03-29

    Logged In: YES
    user_id=596509

    updated patch.
    added new test 22.16, this should fail on current head
    without patch (It also made me realise I'd forgotten to
    backport the bit that fixed this :o)

     
  • Daniel South
    Daniel South
    2005-04-24

    Logged In: YES
    user_id=596509

    updated patch
    a couple of very minor formatting changes (removed some
    uneeded parentheses).
    corrected failing tests on unix (tests weren't taking into
    account handles being shown on unix but not on windows)

     
  • Daniel South
    Daniel South
    2005-04-24

    panedwindow patch for Tk8.5a3

     
  • Daniel South
    Daniel South
    2005-04-29

    Logged In: YES
    user_id=596509

    minor update to 8.4 patch, had an unused variable.

     
  • Daniel South
    Daniel South
    2005-04-29

    panedwindow patch for Tk8.4.10

     
  • Daniel South
    Daniel South
    2005-04-30

    Logged In: YES
    user_id=596509

    Also fixes Bug #1192323, but I can't put this in the
    summary as I've run out of room in the input field :)

     
    • priority: 5 --> 9
     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2005-05-31

    • status: open --> closed-fixed
     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2005-05-31

    Logged In: YES
    user_id=72656

    Patch in to 8.4.10 and 8.5a3 as received. thx!