From 37db572f3f6ea1f2e067448e4e804a8badb46e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedek=20D=C3=A9v=C3=A9nyi?= Date: Sun, 5 Nov 2023 19:41:45 +0100 Subject: [PATCH] Fix invalid color map for treeview This resolves an issue where the a Tcl app with the dark theme applied would throw an error when selecting row in a treeview. This doesn't affect the sv-ttk Python package as this bug was only present in main. --- sv_ttk/theme/dark.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sv_ttk/theme/dark.tcl b/sv_ttk/theme/dark.tcl index 99bbd93..4419e85 100644 --- a/sv_ttk/theme/dark.tcl +++ b/sv_ttk/theme/dark.tcl @@ -438,7 +438,9 @@ namespace eval ttk::theme::sv_dark { -rowheight [expr {[font metrics SunValleyBodyFont -linespace] + 3}] \ -font SunValleyBodyFont - ttk::style map Treeview -background {selected "#292929"} -foreground {selected $colors(-selfg)} + ttk::style map Treeview \ + -background {selected "#292929"} \ + -foreground [list selected $theme_colors(-selfg)] ttk::style element create Treeview.field image $I(card) -border 5 -width 0 -height 0