Add files via upload

This commit is contained in:
Anjok07 2023-09-25 17:13:31 -05:00 committed by GitHub
parent 4b7ad5a04b
commit 488550d4ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -38,10 +38,11 @@ def init(func):
@init
def set_theme(theme):
def set_theme(theme, font_name="Century Gothic", f_size=10):
if theme not in {"dark", "light"}:
raise RuntimeError(f"not a valid theme name: {theme}")
root.globalsetvar("fontName", (font_name, f_size))
root.tk.call("set_theme", theme)

View File

@ -8,6 +8,8 @@ proc set_theme {mode} {
if {$mode == "dark"} {
ttk::style theme use "sun-valley-dark"
set fontString "$::fontName"
array set colors {
-fg "#F6F6F7"
-bg "#0e0e0f"
@ -26,7 +28,7 @@ proc set_theme {mode} {
-insertwidth 0 \
-insertcolor $colors(-fg) \
-fieldbackground $colors(-selectbg) \
-font {"Century Gothic" 10} \
-font $fontString \
-borderwidth 0 \
-relief flat