diff --git a/gui_data/sv_ttk/__init__.py b/gui_data/sv_ttk/__init__.py index 7d4037b..8d62495 100644 --- a/gui_data/sv_ttk/__init__.py +++ b/gui_data/sv_ttk/__init__.py @@ -38,11 +38,12 @@ def init(func): @init -def set_theme(theme, font_name="Century Gothic", f_size=10): +def set_theme(theme, font_name="Century Gothic", f_size=10, fg_color_set="#F6F6F7"): if theme not in {"dark", "light"}: raise RuntimeError(f"not a valid theme name: {theme}") root.globalsetvar("fontName", (font_name, f_size)) + root.globalsetvar("fgcolorset", (fg_color_set)) root.tk.call("set_theme", theme) diff --git a/gui_data/sv_ttk/sun-valley.tcl b/gui_data/sv_ttk/sun-valley.tcl index 6f908fc..094ed13 100644 --- a/gui_data/sv_ttk/sun-valley.tcl +++ b/gui_data/sv_ttk/sun-valley.tcl @@ -9,6 +9,7 @@ proc set_theme {mode} { ttk::style theme use "sun-valley-dark" set fontString "$::fontName" + set fgSet "$::fgcolorset" array set colors { -fg "#F6F6F7" @@ -20,7 +21,7 @@ proc set_theme {mode} { ttk::style configure . \ -background $colors(-bg) \ - -foreground $colors(-fg) \ + -foreground $fgSet \ -troughcolor $colors(-bg) \ -focuscolor $colors(-selectbg) \ -selectbackground $colors(-selectbg) \