diff --git a/VERSION b/VERSION index 2c1ea239..73c2e376 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.315 +8.3.316 diff --git a/tcltk/wrapper.tcl b/tcltk/wrapper.tcl index 143dde8c..c5abe70b 100644 --- a/tcltk/wrapper.tcl +++ b/tcltk/wrapper.tcl @@ -859,6 +859,14 @@ proc magic::maketoolbar { framename } { set locklist [tech locked] set ncols 0 + + # Sometimes the window manager can have bogus values, so allow an + # environment variable LAYOUT_ICON_COLS to override the number of icon + # columns. + if {[info exists ::env(LAYOUT_ICON_COLS)]} { + set ncols [expr $::env(LAYOUT_ICON_COLS) - 1] + } + while {1} { incr ncols set i 0