summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-07-17 00:37:03 (GMT)
committerhobbs <hobbs>2003-07-17 00:37:03 (GMT)
commitf3065b5641a236c48af7dcdcf8e138b72356de98 (patch)
treee73c63e130bd70d8fcb3a8bf1b032954e2ceb46d /generic
parentba154f21db39f6326e1369e93778cad9c1d02385 (diff)
downloadtk-f3065b5641a236c48af7dcdcf8e138b72356de98.zip
tk-f3065b5641a236c48af7dcdcf8e138b72356de98.tar.gz
tk-f3065b5641a236c48af7dcdcf8e138b72356de98.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')
-rw-r--r--generic/tkPanedWindow.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index a096c75..60b938a 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.13 2003/02/21 11:48:54 dkf Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.13.2.1 2003/07/17 00:37:03 hobbs Exp $
*/
#include "tkPort.h"
@@ -1636,9 +1636,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) -
@@ -1646,9 +1649,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) -