Commit working theme changes
This commit is contained in:
parent
a7c8cc5dbf
commit
c3b83b0238
9 changed files with 363 additions and 62 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue