Tk Library Source Code

Artifact [3a6fe7e727]
Login

Artifact 3a6fe7e727b6e3d004145be131e456a6a45c6f63:

Attachment "buttonbox.patch" to ticket [2807147fff] added by danckaert 2009-06-16 19:48:00.
Index: buttonbox.tcl
===================================================================
RCS file: /target/staff/koen/.cvsroot/bwidget/buttonbox.tcl,v
retrieving revision 1.1.1.2
diff -b -u -r1.1.1.2 buttonbox.tcl
--- buttonbox.tcl	9 Nov 2006 11:34:59 -0000	1.1.1.2
+++ buttonbox.tcl	27 May 2009 07:30:44 -0000
@@ -350,12 +350,8 @@
         if {[string equal [Widget::getoption $path -orient] "horizontal"]} {
             grid $but -column $idx -row 0 -sticky nsew
             if { [Widget::getoption $path -homogeneous] } {
-                set req [winfo reqwidth $but]
-                if { $req > $data(max) } {
-                    grid columnconfigure $path [expr {2*$i}] -minsize $req
-                    set data(max) $req
-                }
-                grid columnconfigure $path $idx -weight 1
+# KD 2005/09/20 : use -uniform instead of -minsize
+                grid columnconfigure $path $idx -uniform koen -weight 1
             } else {
                 grid columnconfigure $path $idx -weight 0
             }
@@ -379,16 +375,6 @@
         }
         incr idx 2
     }
-
-    # Now that the maximum size has been calculated, go back through
-    # and correctly set the size for homogeneous horizontal buttons.
-    if { [string equal [Widget::getoption $path -orient] "horizontal"] && [Widget::getoption $path -homogeneous] } {
-        set idx 0
-        foreach i $data(buttons) {
-            grid columnconfigure $path $idx -minsize $data(max)
-            incr idx 2
-        }
-    }
 }