diff options
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl')
-rw-r--r-- | systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl b/systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl index 6c673ddee3..b39959013e 100644 --- a/systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl +++ b/systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl @@ -180,7 +180,6 @@ proc normalize_argv {} { set s [lindex $::argv $i] if {[string range $s 0 1] eq "--"} { set s [string range $s 1 end] - #set ::argv [lreplace $::argv $i $i $s] lset ::argv $i $s } set j [string first "=" $s] @@ -196,6 +195,20 @@ proc normalize_argv {} { } normalize_argv +# set width of a treeview column wide enough +# to fully display all entries +proc set_tree_col_width {tv cl} { + set len 0 + foreach c [$tv children {}] { + # '<pathname> set <item> <column>' without a value parameter + # is really a get. + # Tree cells are set to use TkDefaultFont redo_fonts further down. + set l [font measure TkDefaultFont [$tv set $c $cl]] + if {$l > $len} {set len $l} + } + $tv column $cl -width [expr {$len+10}] +} + # localization support # for the sake of our translators we use our own translation function @@ -419,6 +432,7 @@ proc redo_fonts {} { # height: assume height == width*2 # workaround for treeview on windows on HiDPI displays ttk::style configure Treeview -rowheight [expr {3 * $::cw}] + ttk::style configure Cell -font TkDefaultFont # no bold text for messages; `userDefault' indicates priority option add *Dialog.msg.font TkDefaultFont userDefault |