mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-09-30 02:48:11 +03:00
Fix theme handling for PySide6 >= 6.7.0 on Windows
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -174,8 +174,14 @@ class AppQAction(QTranslatable, SupportThemeChangedCallback, QAction):
|
||||
|
||||
if theme == 'Dark':
|
||||
if PLATFORM == 'Windows':
|
||||
# Windows. Always use black icon
|
||||
super().setIcon(bootstrapIcon(self.iconFileName))
|
||||
# Windows
|
||||
if versionToValue(PYSIDE6_VERSION) < versionToValue('6.7.0'):
|
||||
# PySide6 < 6.7.0 has no system theme handling on Windows.
|
||||
# Always use black icon
|
||||
super().setIcon(bootstrapIcon(self.iconFileName))
|
||||
else:
|
||||
# PySide6 has system theme handling.
|
||||
super().setIcon(bootstrapIconWhite(self.iconFileName))
|
||||
else:
|
||||
if getUbuntuRelease() == '20.04' and self.isTrayAction:
|
||||
# Ubuntu 20.04 system dark theme does not change tray menu color.
|
||||
|
||||
@@ -134,8 +134,14 @@ class XrayAssetViewerQListWidget(SupportThemeChangedCallback, AppQListWidget):
|
||||
else:
|
||||
if theme == 'Dark':
|
||||
if PLATFORM == 'Windows':
|
||||
# Windows. Always use black icon
|
||||
item.setIcon(bootstrapIcon('file-earmark.svg'))
|
||||
# Windows
|
||||
if versionToValue(PYSIDE6_VERSION) < versionToValue('6.7.0'):
|
||||
# PySide6 < 6.7.0 has no system theme handling on Windows.
|
||||
# Always use black icon
|
||||
item.setIcon(bootstrapIcon('file-earmark.svg'))
|
||||
else:
|
||||
# PySide6 has system theme handling.
|
||||
item.setIcon(bootstrapIconWhite('file-earmark.svg'))
|
||||
else:
|
||||
item.setIcon(bootstrapIconWhite('file-earmark.svg'))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user