summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpspjuth <pspjuth@noemail.net>2004-02-18 20:10:32 (GMT)
committerpspjuth <pspjuth@noemail.net>2004-02-18 20:10:32 (GMT)
commit13f02a80229007941f8ea1607faef94cf1a350b5 (patch)
tree03cf3cb94726afc1a5ac7ed8873f477221f134f4 /tests
parent4d2f2940eab6848475c7aaf08a080b7d2f4286a5 (diff)
downloadtk-13f02a80229007941f8ea1607faef94cf1a350b5.zip
tk-13f02a80229007941f8ea1607faef94cf1a350b5.tar.gz
tk-13f02a80229007941f8ea1607faef94cf1a350b5.tar.bz2
Fixed a bug in grid geometry calculations for
a shrinking grid. [Bug 899246] FossilOrigin-Name: 89e1956c6d85331b5d929dab83905a1155d1643a
Diffstat (limited to 'tests')
-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.