From b701eef710636bced938460cc84d59b9294c5633 Mon Sep 17 00:00:00 2001 From: Hans Unzner Date: Thu, 7 May 2026 14:13:34 +0200 Subject: [PATCH 1/2] pickconfig: scale row height according to current font height Before this, the row height of the treeview was fixed at ca. 15 px. With a higher DPI setting, the text overlaps. This sets a row height according to the font height. --- tcl/bin/pickconfig.tcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tcl/bin/pickconfig.tcl b/tcl/bin/pickconfig.tcl index 0664c0b92d1..5c8a900ca77 100755 --- a/tcl/bin/pickconfig.tcl +++ b/tcl/bin/pickconfig.tcl @@ -405,9 +405,12 @@ set f2 [ frame $f1.f2 -borderwidth 0 -relief flat -padx 15 ] # Let the tree scroll set s1 [ SW $f2.f3 -auto both] $s1 configure -relief sunken -borderwidth 2 +# get the font height to scale the height of the tree rows +set font_linespace [font metrics [linuxcnc::standard_font] -linespace] # the tree set ::tree [Tree $s1.tree -highlightthickness 0 \ -width 25 -relief flat -padx 4 \ + -deltay $font_linespace\ ] $s1 setwidget $::tree pack $s1 -fill y -expand n -side left From f60356c75a62f1f0a8847b2e5c2441f46a92156a Mon Sep 17 00:00:00 2001 From: Hans Unzner Date: Thu, 7 May 2026 14:33:16 +0200 Subject: [PATCH 2/2] pickconfig: scale also tree width with font size --- tcl/bin/pickconfig.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcl/bin/pickconfig.tcl b/tcl/bin/pickconfig.tcl index 5c8a900ca77..d8057d45d30 100755 --- a/tcl/bin/pickconfig.tcl +++ b/tcl/bin/pickconfig.tcl @@ -409,7 +409,7 @@ $s1 configure -relief sunken -borderwidth 2 set font_linespace [font metrics [linuxcnc::standard_font] -linespace] # the tree set ::tree [Tree $s1.tree -highlightthickness 0 \ - -width 25 -relief flat -padx 4 \ + -width [expr {int($font_linespace * 1.33)}] -relief flat -padx 4 \ -deltay $font_linespace\ ] $s1 setwidget $::tree