From b83d7ca2cce25fbde8cedef08a57c6db02ddf7f5 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 12 Jan 2025 19:36:47 +0100 Subject: [PATCH] Fix theme test --- tests/test_gui/test_gui_theme.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_gui/test_gui_theme.py b/tests/test_gui/test_gui_theme.py index 50acebfc..9c368f11 100644 --- a/tests/test_gui/test_gui_theme.py +++ b/tests/test_gui/test_gui_theme.py @@ -25,7 +25,6 @@ from pathlib import Path import pytest from PyQt6.QtGui import QColor, QIcon, QPalette, QPixmap -from PyQt6.QtWidgets import QApplication from novelwriter import CONFIG, SHARED from novelwriter.common import NWConfigParser @@ -152,7 +151,7 @@ def testGuiTheme_Theme(qtbot, monkeypatch, nwGUI, tstPaths): assert mainTheme.loadTheme() is True # This should load a standard palette - wCol = QApplication.style().standardPalette().color(QPalette.ColorRole.Window).getRgb() + wCol = QPalette().color(QPalette.ColorRole.Window).getRgb() assert mainTheme._guiPalette.color(QPalette.ColorRole.Window).getRgb() == wCol # Mock Dark Theme