From b4a2bb05f0fb228278bc19d862fb11696a9820d3 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sat, 20 Feb 2021 13:15:39 -0500 Subject: [PATCH] Applied one other trick to use the Tk command "font measure" to determine the pixel size of the default font, and to size up the icons to match, automatically. This avoids issues with trying to force a setting from the .xcircuitrc file. --- lib/tcl/wrapper.tcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tcl/wrapper.tcl b/lib/tcl/wrapper.tcl index 89086d5..21e146e 100644 --- a/lib/tcl/wrapper.tcl +++ b/lib/tcl/wrapper.tcl @@ -2234,7 +2234,10 @@ proc xcircuit::maketoolimages {} { set XCOps(tools) [list pn w b a s t mv cp e d2 cw ccw fx fy r pu2 po2 mk pz \ uj co bd fi pm pa li yp pl z4 z5 i] - if [catch {set XCOps(scale)}] {set XCOps(scale) 1.0} + if [catch {set XCOps(scale)}] { + set XCOps(scale) [expr {int([font measure TkDefaultFont M] / 10)}] + } + puts stdout "XCOps(scale) set to $XCOps(scale)" set gsize [expr {int($XCOps(scale) * 20)}] set gscale [expr {int($XCOps(scale))}] -- 2.11.4.GIT