Skip to content

Commit 53e903b

Browse files
committed
fix(ui): use correct accent color role on linux
1 parent 83de98f commit 53e903b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎src/tagstudio/qt/views/styles/palette.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,17 @@ def set_palette(palette: QPalette) -> None:
5252

5353
@staticmethod
5454
def accent() -> QColor:
55-
# NOTE: As of PySide 6.8.0.1, the QPalette.ColorRole.Accent role no longer works on Windows.
55+
# NOTE: As of PySide 6.8.0.1, the QPalette.ColorRole.Accent role no longer works on Windows,
56+
# and as of PySide 6.11.2 (and earlier to a point) it doesn't work on KDE either.
5657
# The QPalette.ColorRole.Highlight does for some reason, but is faded on macOS.
5758

5859
if not Palette._palette:
5960
logger.error("[Style] No QPalette set!")
6061
return QColor.fromString(get_ui_color(ColorType.PRIMARY, UiColor.BLUE))
6162
role = (
62-
QPalette.ColorRole.Highlight
63-
if platform.system() == "Windows"
64-
else QPalette.ColorRole.Accent
63+
QPalette.ColorRole.Accent
64+
if platform.system() == "Darwin"
65+
else QPalette.ColorRole.Highlight
6566
)
6667

6768
color = QPalette.color(Palette._palette, role)

0 commit comments

Comments
 (0)