Fusion als Standard-Thema gesetzt. Thema wird in config.json gespeichert
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -58,6 +58,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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user