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 -5
View File
@@ -45,7 +45,10 @@ from novelwriter.constants import nwLabels
from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType, nwStandardButton, nwTheme
from novelwriter.error import logException
from novelwriter.extensions.modified import NPushButton
from novelwriter.types import QtBlack, QtHexArgb, QtPaintAntiAlias, QtTransparent
from novelwriter.types import (
QtBlack, QtColActive, QtColDisabled, QtColInactive, QtHexArgb,
QtPaintAntiAlias, QtTransparent
)
if TYPE_CHECKING:
from pathlib import Path
@@ -439,10 +442,6 @@ class GuiTheme:
window = self._guiPalette.window().color()
highlight = self._guiPalette.highlight().color()
QtColActive = QPalette.ColorGroup.Active
QtColInactive = QPalette.ColorGroup.Inactive
QtColDisabled = QPalette.ColorGroup.Disabled
if window.lightnessF() < 0.15:
# If window is too dark, we need a lighter ref colour for shades
ref = QColor.fromHslF(window.hueF(), window.saturationF(), 0.15, window.alphaF())