summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tltcl
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2021-03-10 17:10:33 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2021-03-10 17:10:33 +0000
commit2a0b7e92506a2ad8a63ce67b6da6b263f5442111 (patch)
tree145400794c0b50d6a5efe167cd2172ae8ca34af4 /Master/tlpkg/tltcl
parent85def6f43dcf9cb2d77aa01392326ddf315c0965 (diff)
Capitalization paper sizes; some computed column widths
git-svn-id: svn://tug.org/texlive/trunk@58251 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tltcl')
-rw-r--r--Master/tlpkg/tltcl/tltcl.tcl16
1 files changed, 15 insertions, 1 deletions
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 {}] {
+ # '<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