texlive[51232] Master/tlpkg/tltcl/gui_err.tcl: Better window width

commits+siepo at tug.org commits+siepo at tug.org
Mon May 27 21:03:14 CEST 2019


Revision: 51232
          http://tug.org/svn/texlive?view=revision&revision=51232
Author:   siepo
Date:     2019-05-27 21:03:14 +0200 (Mon, 27 May 2019)
Log Message:
-----------
Better window width for windows gui error box

Modified Paths:
--------------
    trunk/Master/tlpkg/tltcl/gui_err.tcl

Modified: trunk/Master/tlpkg/tltcl/gui_err.tcl
===================================================================
--- trunk/Master/tlpkg/tltcl/gui_err.tcl	2019-05-27 19:00:46 UTC (rev 51231)
+++ trunk/Master/tlpkg/tltcl/gui_err.tcl	2019-05-27 19:03:14 UTC (rev 51232)
@@ -1,5 +1,13 @@
 #!/usr/bin/env wish
+
+# fonts
+# no bold text for messages; `userDefault' indicates priority
+catch {option add *Dialog.msg.font TkDefaultFont userDefault}
+# width of '0', as a rough estimate of average character width
+set ::cw 8
+catch {set ::cw [font measure TkDefaultFont "0"]}
+
 wm title . "Warning/Error"
-pack [label .l -text $::env(RUNSCRIPT_ERROR_MESSAGE) -wraplength 80] \
-    -padx 6 -pady 3
+label .l -text $::env(RUNSCRIPT_ERROR_MESSAGE) -wraplength [expr {60*$::cw}]
+pack .l -padx 6 -pady 3
 pack [button .q -text "Ok" -command exit] -ipadx 3 -pady 3



More information about the tex-live-commits mailing list