summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-08-01 19:33:26 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-08-01 19:33:26 (GMT)
commit76a0635b1798c818181b11dbab2f8199e6aed309 (patch)
treef9a392ad69f099058aa8d140c53aed43f65029a8 /library
parent43db61fc40396e833bec98fef969addbc26e143b (diff)
downloadtk-76a0635b1798c818181b11dbab2f8199e6aed309.zip
tk-76a0635b1798c818181b11dbab2f8199e6aed309.tar.gz
tk-76a0635b1798c818181b11dbab2f8199e6aed309.tar.bz2
Fix [4736b9f290]: Bug in tk_setPalette in connection with TIP 645 ('ttk color palette support'). Patch from Csaba Nemethi.
Diffstat (limited to 'library')
-rw-r--r--library/palette.tcl4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/palette.tcl b/library/palette.tcl
index 8cea657..90b499b 100644
--- a/library/palette.tcl
+++ b/library/palette.tcl
@@ -154,6 +154,10 @@ proc ::tk_setPalette {args} {
array set ::tk::Palette [array get new]
+ if {[tk windowingsystem] ne "x11" || [ttk::style theme use] ne "default"} {
+ return
+ }
+
# Update the 'default' ttk theme with the new palette,
# and then set 'default' as the current ttk theme,
# in order to apply the new palette to the ttk widgets.