summaryrefslogtreecommitdiffstats
path: root/tests/grid.test
diff options
context:
space:
mode:
authorpeter.spjuth@gmail.com <pspjuth>2005-04-03 15:21:47 (GMT)
committerpeter.spjuth@gmail.com <pspjuth>2005-04-03 15:21:47 (GMT)
commit0bfb6f2625d6d941e8e8759dff7962ef7ccbe3d3 (patch)
tree8a08bc26118d895204f0b23b236fbc240f9a72e2 /tests/grid.test
parent8d38598d2a467a5b20e7d7807a18e082da3067ca (diff)
downloadtk-0bfb6f2625d6d941e8e8759dff7962ef7ccbe3d3.zip
tk-0bfb6f2625d6d941e8e8759dff7962ef7ccbe3d3.tar.gz
tk-0bfb6f2625d6d941e8e8759dff7962ef7ccbe3d3.tar.bz2
Fixed bug in geometry calculations for
widgets that span multiple columns/row. Bug was introduced in 8.5a1 when fixing 792387. [Bug 1175092]
Diffstat (limited to 'tests/grid.test')
-rw-r--r--tests/grid.test28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/grid.test b/tests/grid.test
index fca981c..0428eb4 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.25 2004/11/07 22:00:12 pspjuth Exp $
+# RCS: @(#) $Id: grid.test,v 1.26 2005/04/03 15:21:49 pspjuth Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -1660,6 +1660,32 @@ test grid-16.17 {layout weights (shrinking at minsize)} {
} {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.17
+test grid-16.18 {layout span} {
+ frame .f1 -width 30 -height 20
+ frame .f2 -width 166 -height 20
+ frame .f3 -width 39 -height 20
+ frame .f4 -width 10 -height 20
+
+ grid .f1 .f3 -
+ grid .f2 - .f4
+ grid columnconfigure . 0 -weight 1
+
+ set res {}
+ foreach w {{1 0 0} {0 1 0} {0 0 1}} {
+ for {set c 0} {$c < 3} {incr c} {
+ grid columnconfigure . $c -weight [lindex $w $c]
+ }
+ update
+ set res2 {}
+ for {set c 0} {$c <= 2} {incr c} {
+ lappend res2 [lindex [grid bbox . $c 0] 2]
+ }
+ lappend res $res2
+ }
+ set res
+} [list [list 137 29 10] [list 30 136 10] [list 98 68 10]]
+grid_reset 16.18
+
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.