diff options
author | hobbs <hobbs> | 2003-07-17 00:39:53 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-07-17 00:39:53 (GMT) |
commit | 90c5fc87e6d93ff8788adee1e3ffdbe9c37bbf28 (patch) | |
tree | 0d188cbd53892d49a7445389d9bdde6bef8e8d12 /generic/tkPanedWindow.c | |
parent | befc533415b9b751e657c3cdbb0ce70f23fd5b39 (diff) | |
download | tk-90c5fc87e6d93ff8788adee1e3ffdbe9c37bbf28.zip tk-90c5fc87e6d93ff8788adee1e3ffdbe9c37bbf28.tar.gz tk-90c5fc87e6d93ff8788adee1e3ffdbe9c37bbf28.tar.bz2 |
* generic/tkPanedWindow.c (ArrangePanes): Ensure that the last pane
* tests/panedwindow.test: shrinks instead of being clipped when
resized below the reqsize. [Bug 748277] (spjuth)
Diffstat (limited to 'generic/tkPanedWindow.c')
-rw-r--r-- | generic/tkPanedWindow.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 9d72509..eb0108f 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPanedWindow.c,v 1.14 2003/05/21 15:31:01 dkf Exp $ + * RCS: @(#) $Id: tkPanedWindow.c,v 1.15 2003/07/17 00:39:53 hobbs Exp $ */ #include "tkPort.h" @@ -1643,9 +1643,12 @@ ArrangePanes(clientData) if (pwPtr->orient == ORIENT_HORIZONTAL) { paneWidth = slavePtr->paneWidth; if (i == pwPtr->numSlaves - 1 && Tk_IsMapped(pwPtr->tkwin)) { - if (Tk_Width(pwPtr->tkwin) > Tk_ReqWidth(pwPtr->tkwin)) { + if (Tk_Width(pwPtr->tkwin) != Tk_ReqWidth(pwPtr->tkwin)) { paneWidth += Tk_Width(pwPtr->tkwin) - Tk_ReqWidth(pwPtr->tkwin); + if (paneWidth < 0) { + paneWidth = 0; + } } } paneHeight = Tk_Height(pwPtr->tkwin) - (2 * slavePtr->pady) - @@ -1653,9 +1656,12 @@ ArrangePanes(clientData) } else { paneHeight = slavePtr->paneHeight; if (i == pwPtr->numSlaves - 1 && Tk_IsMapped(pwPtr->tkwin)) { - if (Tk_Height(pwPtr->tkwin) > Tk_ReqHeight(pwPtr->tkwin)) { + if (Tk_Height(pwPtr->tkwin) != Tk_ReqHeight(pwPtr->tkwin)) { paneHeight += Tk_Height(pwPtr->tkwin) - Tk_ReqHeight(pwPtr->tkwin); + if (paneHeight < 0) { + paneHeight = 0; + } } } paneWidth = Tk_Width(pwPtr->tkwin) - (2 * slavePtr->padx) - |