diff --git a/src/conf.py b/src/conf.py index cf101a8..0df0c90 100644 --- a/src/conf.py +++ b/src/conf.py @@ -74,6 +74,7 @@ class AppSettings(BaseSettings): apache_fops: list[ApacheFop] = [] xsl_dirs: list[XslDir] = [] pdf_projects: list[PdfProject] = [] + theme: str | None = None model_config = SettingsConfigDict(json_file=config_path) diff --git a/src/ui/MainWindow.py b/src/ui/MainWindow.py index 99d7d6a..a2d3c88 100644 --- a/src/ui/MainWindow.py +++ b/src/ui/MainWindow.py @@ -57,6 +57,12 @@ class MainWindow(QMainWindow): # Theme-MenĂ¼ initialisieren self._setup_theme_menu() + + # + if (theme := app_settings.theme): + self.change_theme(theme) + else: + self.change_theme('Fusion') # Bilder laden self._load_images() @@ -109,6 +115,8 @@ class MainWindow(QMainWindow): action.setChecked(action.text() == theme_name) print(f"Theme erfolgreich gewechselt zu: {theme_name}") + app_settings.theme = theme_name + app_settings.save() else: print(f"Fehler: Theme '{theme_name}' konnte nicht erstellt werden")