-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
24 lines (23 loc) · 880 Bytes
/
Copy pathmain.py
File metadata and controls
24 lines (23 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from app.utils.save import load_data
from app.ui.shared.theme import (
set_active_theme,
set_font_scale,
set_high_contrast_mode,
DEFAULT_THEME_NAME,
DEFAULT_FONT_SCALE,
)
if __name__ == "__main__":
data = load_data()
settings = data.get("settings", {})
theme_name = settings.get("theme_name", DEFAULT_THEME_NAME)
font_scale = settings.get("font_scale", DEFAULT_FONT_SCALE)
high_contrast_mode = bool(settings.get("high_contrast_mode", False))
try:
set_active_theme(theme_name)
except ValueError:
set_active_theme(DEFAULT_THEME_NAME)
set_font_scale(font_scale)
set_high_contrast_mode(high_contrast_mode)
from app.ui.main.main_window import run
run()
#do not touch unless data changes are made to the save file structure, in which case this should be updated to migrate old save data to the new format