Merge pull request #7 from faroukbmiled/refactored

load theme fix
This commit is contained in:
Ryuk 2023-09-25 11:15:35 -07:00 committed by GitHub
commit 502a332734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,9 +362,13 @@ class SettingsTab(ctk.CTkFrame):
if setting == "theme": if setting == "theme":
theme_config = check_config("theme", "boiiiwd_theme.json") theme_config = check_config("theme", "boiiiwd_theme.json")
if os.path.exists(os.path.join(application_path, theme_config)): if os.path.exists(os.path.join(application_path, theme_config)):
return "Custom" return "Custom"
if theme_config == "boiiiwd_theme.json":
return "Default"
match = re.match(r'boiiiwd_(\w+)\.json', theme_config) match = re.match(r'boiiiwd_(\w+)\.json', theme_config)
if match: if match:
theme_name = match.group(1).capitalize() theme_name = match.group(1).capitalize()