Fix brush for disabled novel selector (#2482)

This commit is contained in:
Veronica Berglyd Olsen
2025-10-27 22:12:04 +01:00
parent b60cbdf5f1
commit 0544599303
3 changed files with 20 additions and 11 deletions
+4 -1
View File
@@ -34,6 +34,7 @@ from PyQt6.QtWidgets import QComboBox
from novelwriter import SHARED
from novelwriter.constants import nwLabels
from novelwriter.enum import nwItemClass
from novelwriter.types import QtColDisabled
if TYPE_CHECKING:
from PyQt6.QtWidgets import QWidget
@@ -93,7 +94,9 @@ class NovelSelector(QComboBox):
def updateTheme(self) -> None:
"""Update theme colours."""
palette = self.palette()
palette.setBrush(QPalette.ColorGroup.Disabled, QPalette.ColorRole.Text, palette.text())
palette.setBrush(QtColDisabled, QPalette.ColorRole.Text, palette.text())
palette.setBrush(QtColDisabled, QPalette.ColorRole.WindowText, palette.windowText())
palette.setBrush(QtColDisabled, QPalette.ColorRole.ButtonText, palette.buttonText())
self.setPalette(palette)
self.refreshNovelList()