Fix custom theme handling for Qt6

This commit is contained in:
Veronica Berglyd Olsen
2025-01-11 23:55:08 +01:00
parent ff7446a2ef
commit 27a0a47aaa
7 changed files with 50 additions and 17 deletions
+3
View File
@@ -254,11 +254,13 @@ def main(sysArgs: list | None = None) -> GuiMain | None:
pass # Quietly ignore error
# Import GUI (after dependency checks), and launch
from novelwriter.gui.theme import GuiTheme
from novelwriter.guimain import GuiMain
if testMode:
# Only used for testing where the test framework creates the app
CONFIG.loadConfig()
SHARED.initTheme(GuiTheme())
return GuiMain()
app = QApplication([CONFIG.appName, (f"-style={qtStyle}")])
@@ -274,6 +276,7 @@ def main(sysArgs: list | None = None) -> GuiMain | None:
# Run Config steps that require the QApplication
CONFIG.loadConfig()
CONFIG.initLocalisation(app)
SHARED.initTheme(GuiTheme())
# Launch main GUI
nwGUI = GuiMain()