summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-05-31 20:17:29 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-05-31 20:17:29 (GMT)
commitfba5250f5a416261bcf0a772189ac7cf2eaabd20 (patch)
tree232714215b5b71b773bb0ab93af8ebe46ef5ce10
parentb94f5639e0d02222c409549af8dc464260afbfe6 (diff)
downloadtk-fba5250f5a416261bcf0a772189ac7cf2eaabd20.zip
tk-fba5250f5a416261bcf0a772189ac7cf2eaabd20.tar.gz
tk-fba5250f5a416261bcf0a772189ac7cf2eaabd20.tar.bz2
Fix [bc43fd20cf]: paneconfigure not working as expectedbug_bc43fd20cf
-rw-r--r--generic/tkPanedWindow.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index f350d0a..17e2b4a 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -1789,10 +1789,18 @@ ArrangePanes(
*/
if (horizontal) {
- paneSize = slavePtr->paneWidth;
+ if (slavePtr->width > 0) {
+ paneSize = slavePtr->width;
+ } else {
+ paneSize = slavePtr->paneWidth;
+ }
stretchReserve -= paneSize + (2 * slavePtr->padx);
} else {
- paneSize = slavePtr->paneHeight;
+ if (slavePtr->height > 0) {
+ paneSize = slavePtr->height;
+ } else {
+ paneSize = slavePtr->paneHeight;
+ }
stretchReserve -= paneSize + (2 * slavePtr->pady);
}
if (IsStretchable(slavePtr->stretch,i,first,last)
@@ -1842,10 +1850,18 @@ ArrangePanes(
*/
if (horizontal) {
- paneSize = slavePtr->paneWidth;
+ if (slavePtr->width > 0) {
+ paneSize = slavePtr->width;
+ } else {
+ paneSize = slavePtr->paneWidth;
+ }
pwSize = pwWidth;
} else {
- paneSize = slavePtr->paneHeight;
+ if (slavePtr->height > 0) {
+ paneSize = slavePtr->height;
+ } else {
+ paneSize = slavePtr->paneHeight;
+ }
pwSize = pwHeight;
}
if (IsStretchable(slavePtr->stretch, i, first, last)) {