Commit working theme changes

This commit is contained in:
Miguel Jacq 2025-11-06 10:56:20 +11:00
parent a7c8cc5dbf
commit c3b83b0238
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
9 changed files with 363 additions and 62 deletions

View file

@ -22,12 +22,14 @@ def load_db_config() -> DBConfig:
s = get_settings()
path = Path(s.value("db/path", str(default_db_path())))
key = s.value("db/key", "")
idle = s.value("db/idle_minutes", 15, type=int)
return DBConfig(path=path, key=key, idle_minutes=idle)
idle = s.value("ui/idle_minutes", 15, type=int)
theme = s.value("ui/theme", "system", type=str)
return DBConfig(path=path, key=key, idle_minutes=idle, theme=theme)
def save_db_config(cfg: DBConfig) -> None:
s = get_settings()
s.setValue("db/path", str(cfg.path))
s.setValue("db/key", str(cfg.key))
s.setValue("db/idle_minutes", str(cfg.idle_minutes))
s.setValue("ui/idle_minutes", str(cfg.idle_minutes))
s.setValue("ui/theme", str(cfg.theme))