summaryrefslogtreecommitdiff
path: root/Master/tlpkg
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
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')
-rwxr-xr-xMaster/tlpkg/installer/install-tl-gui.tcl9
-rw-r--r--Master/tlpkg/tltcl/tltcl.tcl16
2 files changed, 21 insertions, 4 deletions
diff --git a/Master/tlpkg/installer/install-tl-gui.tcl b/Master/tlpkg/installer/install-tl-gui.tcl
index a8b5c0415c1..285cfc83af9 100755
--- a/Master/tlpkg/installer/install-tl-gui.tcl
+++ b/Master/tlpkg/installer/install-tl-gui.tcl
@@ -906,6 +906,7 @@ proc select_binaries {} {
.tlbin.lst insert {} end -id $b -values \
[list [mark_sym $::vars($bb)] [__ $::bin_descs($b)]]
}
+ set_tree_col_width .tlbin.lst "desc"
pgrid .tlbin.lst -in .tlbin.binsf -row 0 -column 0 -sticky news
pgrid .tlbin.binsc -in .tlbin.binsf -row 0 -column 1 -sticky ns
grid columnconfigure .tlbin.binsf 0 -weight 1
@@ -955,14 +956,14 @@ proc select_scheme {} {
ppack .tlschm.cancel -in .tlschm.buts -side right
bind .tlschm <Escape> {.tlschm.cancel invoke}
- # schemes list
+ # schemes list. use treeview rather than listbox for uniform formatting
ttk::treeview .tlschm.lst -columns {desc} -show {} -selectmode browse \
-height [llength $::schemes_order]
- .tlschm.lst column "desc" -stretch 1; # -minwidth $max_width
ppack .tlschm.lst -in .tlschm.bg -fill both -expand 1
foreach s $::schemes_order {
.tlschm.lst insert {} end -id $s -values [list [__ $::scheme_descs($s)]]
}
+ set_tree_col_width .tlschm.lst "desc"
# we already made sure that $::vars(selected_scheme) has a valid value
.tlschm.lst selection set [list $::vars(selected_scheme)]
@@ -1087,6 +1088,8 @@ proc select_collections {} {
$wgt insert {} end -id $c -values \
[list [mark_sym $::vars($c)] [__ $::coll_descs($c)]]
}
+ set_tree_col_width .tlcoll.lang "desc"
+ set_tree_col_width .tlcoll.other "desc"
wm protocol .tlcoll WM_DELETE_WINDOW \
{cancel_or_destroy .tlcoll.cancel .tlcoll}
@@ -1595,7 +1598,7 @@ proc run_menu {} {
}
# instopt_letter
- set ::lpapers {"A4" "letter"}
+ set ::lpapers {"A4" "Letter"}
incr rw
pgrid [ttk::label .paperl -text [__ "Default paper size"]] \
-in $curf -row $rw -column 0 -sticky w
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