summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-04-02 03:20:54 +0000
committerNorbert Preining <norbert@preining.info>2021-04-02 03:20:54 +0000
commit3f173002d4a4a84e7d1fa5a74755fdd00d08a9c2 (patch)
tree5ed380344702de1f9ab53b68b6c3bcd6b8458087 /systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl
parentf78ba658b3ecd56053fe0837a4404d0c6c16a707 (diff)
CTAN sync 202104020320
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl')
-rw-r--r--systems/texlive/tlnet/tlpkg/tltcl/tltcl.tcl16
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