From 2a0b7e92506a2ad8a63ce67b6da6b263f5442111 Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Wed, 10 Mar 2021 17:10:33 +0000 Subject: Capitalization paper sizes; some computed column widths git-svn-id: svn://tug.org/texlive/trunk@58251 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tltcl/tltcl.tcl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Master/tlpkg/tltcl') diff --git a/Master/tlpkg/tltcl/tltcl.tcl b/Master/tlpkg/tltcl/tltcl.tcl index 6c673ddee3f..b39959013ef 100644 --- a/Master/tlpkg/tltcl/tltcl.tcl +++ b/Master/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 {}] { + # ' set ' 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 -- cgit v1.2.3