Skip to content

fix(ts_qt): do not set palette for Linux-like systems that offer theming #869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/tagstudio/qt/ts_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import dataclasses
import math
import os
import platform
import re
import sys
import time
Expand Down Expand Up @@ -257,7 +258,9 @@ def start(self) -> None:
app = QApplication(sys.argv)
app.setStyle("Fusion")

if QGuiApplication.styleHints().colorScheme() is Qt.ColorScheme.Dark:
if (
platform.system() == "Darwin" or platform.system() == "Windows"
) and QGuiApplication.styleHints().colorScheme() is Qt.ColorScheme.Dark:
pal: QPalette = app.palette()
pal.setColor(QPalette.ColorGroup.Normal, QPalette.ColorRole.Window, QColor("#1e1e1e"))
pal.setColor(QPalette.ColorGroup.Normal, QPalette.ColorRole.Button, QColor("#1e1e1e"))
Expand Down