avoid usage of tk / tk_scaling if no X

This commit is contained in:
stefan schippers 2025-09-29 09:43:54 +02:00
parent 2195596902
commit 9b6e0c697f
1 changed files with 18 additions and 11 deletions

View File

@ -10130,18 +10130,19 @@ proc entry_replace_selection {w} {
# tk_focusFollowsMouse
# set or get scaling factor
if { [info exists tk_scaling] } {
# set scaling
tk scaling $tk_scaling ;# useful for 4k displays (set bigger widgets)
} else {
# get scaling
set tk_scaling [tk scaling]
}
set_ne dark_colorscheme 1
set_ne dark_gui_colorscheme 0
if { [info exists has_x]} {
# set or get scaling factor
if { [info exists tk_scaling] } {
# set scaling
tk scaling $tk_scaling ;# useful for 4k displays (set bigger widgets)
} else {
# get scaling
set tk_scaling [tk scaling]
}
if { $dark_gui_colorscheme == 0 } { ;# normal GUI
option add *foreground black startupFile
option add *activeForeground black startupFile
@ -10233,8 +10234,14 @@ if {$OS == "Windows"} {
}
# used in C code
set_ne canvas_width [expr {int(800. * $tk_scaling)}]
set_ne canvas_height [expr {int(500. * $tk_scaling)}]
if {[info exists tk_scaling]} {
set_ne canvas_width [expr {int(800. * $tk_scaling)}]
set_ne canvas_height [expr {int(500. * $tk_scaling)}]
} else {
set_ne canvas_width 1000
set_ne canvas_height 700
}
set_ne xschem_libs {}
set_ne noprint_libs {}
set_ne nolist_libs {}