Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
VasigaranAndAngel committed Nov 16, 2024
1 parent 62a4a92 commit 06059c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tagstudio/src/qt/theme.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections.abc import Callable
from typing import Literal

from PySide6.QtCore import QSettings, Qt
from PySide6.QtGui import QColor, QPalette
Expand Down Expand Up @@ -115,7 +116,7 @@ def update_palette() -> None:
settings: QSettings = driver.settings

settings.beginGroup("Appearance")
dark_mode_value: str = settings.value("DarkMode", -1) # type: ignore
dark_mode_value: str = settings.value("DarkMode", "-1") # type: ignore
dark_theme_file: str | None = settings.value("DarkThemeFile", None) # type: ignore
light_theme_file: str | None = settings.value("LightThemeFile", None) # type: ignore
settings.endGroup()
Expand All @@ -129,6 +130,7 @@ def update_palette() -> None:
# light_theme_file: str | None
# "Path to the light theme file."

dark_mode: bool | Literal[-1]
true_values = ("1", "yes", "true", "on")
false_values = ("0", "no", "false", "off")

Expand Down

0 comments on commit 06059c0

Please sign in to comment.