summaryrefslogtreecommitdiffstats
path: root/tests/grid.test
diff options
context:
space:
mode:
authorpspjuth <peter.spjuth@gmail.com>2004-02-18 20:10:33 (GMT)
committerpspjuth <peter.spjuth@gmail.com>2004-02-18 20:10:33 (GMT)
commitc65b9b4c74b0c66f1c7988049adcaa1370c95f97 (patch)
tree03cf3cb94726afc1a5ac7ed8873f477221f134f4 /tests/grid.test
parent65aade6bfeead87badb9a2e0c40635bce209538e (diff)
downloadtk-c65b9b4c74b0c66f1c7988049adcaa1370c95f97.zip
tk-c65b9b4c74b0c66f1c7988049adcaa1370c95f97.tar.gz
tk-c65b9b4c74b0c66f1c7988049adcaa1370c95f97.tar.bz2
Fixed a bug in grid geometry calculations for
a shrinking grid. [Bug 899246]
Diffstat (limited to 'tests/grid.test')
-rw-r--r--tests/grid.test28
1 files changed, 26 insertions, 2 deletions
diff --git a/tests/grid.test b/tests/grid.test
index c47348e..50064e3 100644
--- a/tests/grid.test
+++ b/tests/grid.test
@@ -5,7 +5,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: grid.test,v 1.17 2002/10/10 21:07:52 pspjuth Exp $
+# RCS: @(#) $Id: grid.test,v 1.17.2.1 2004/02/18 20:10:34 pspjuth Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -1305,7 +1305,7 @@ test grid-16.7 {layout weights (shrinking at minsize)} {
lappend a [winfo width .$i]-[winfo height .$i]-[winfo ismapped .$i]
}
set a
-} {100-75-1 1-1-0 200-150-1}
+} {100-75-1 1-1-0 100-75-1}
grid_reset 16.7
test grid-16.8 {layout internal constraints} {
@@ -1426,6 +1426,30 @@ test grid-16.12 {layout uniform (grow)} {
{0 0 70 95} {70 0 50 95} {120 0 140 95} {260 0 90 95}]
grid_reset 16.12
+test grid-16.13 {layout weights (shrinking at minsize)} {
+ foreach i {0 1 2 3} {
+ frame .$i -bg gray -width 100 -height 75 -bd 2 -relief ridge
+ grid .$i -row $i -column $i -sticky nswe
+ }
+ grid propagate . 0
+ grid columnconfigure . {0 1} -weight 1 -minsize 0
+ grid rowconfigure . {0 1} -weight 1 -minsize 0
+ set a ""
+ . configure -width 250 -height 200
+ update
+ foreach i {0 1 2 3} {
+ lappend a [winfo width .$i]-[winfo height .$i]-[winfo ismapped .$i]
+ }
+ . configure -width 150 -height 100
+ update
+ foreach i {0 1 2 3} {
+ lappend a [winfo width .$i]-[winfo height .$i]-[winfo ismapped .$i]
+ }
+ set a
+} {25-25-1 25-25-1 100-75-1 100-75-1 25-25-0 25-25-0 100-75-1 100-75-1}
+grid_reset 16.13
+
+
test grid-17.1 {forget and pending idle handlers} {
# This test is intended to detect a crash caused by a failure to remove
# pending idle handlers when grid forget is invoked.