Add files via upload

This commit is contained in:
Anjok07 2023-09-26 22:01:36 -05:00 committed by GitHub
parent eee83254e4
commit d828060916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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) \