Skip to content

Commit

Permalink
Move apply_theme to main_window, before restoring geometry and state
Browse files Browse the repository at this point in the history
  • Loading branch information
jonoomph committed Jul 8, 2024
1 parent 2ebc773 commit 906bc93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/classes/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,6 @@ def gui(self):
log.debug("Creating main interface window")
self.window = MainWindow()

# Instantiate Theme Manager (Singleton)
theme_name = self.settings.get("theme")
theme = self.theme_manager.apply_theme(theme_name)

# Update theme in settings
self.settings.set("theme", theme.name)

# Check for gui launch failures
if self.mode == "quit":
self.window.close()
Expand Down
5 changes: 5 additions & 0 deletions src/windows/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -3485,6 +3485,11 @@ def __init__(self, *args):
# Create tutorial manager
self.tutorial_manager = TutorialManager(self)

# Apply theme
theme_name = s.get("theme")
theme = get_app().theme_manager.apply_theme(theme_name)
s.set("theme", theme.name)

# Apply saved window geometry/state from settings
if self.saved_geometry:
self.restoreGeometry(self.saved_geometry)
Expand Down

0 comments on commit 906bc93

Please sign in to comment.