mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix dark mode display issues on macOS/Qt5
This commit is contained in:
parent
a38121a713
commit
8a9535383c
1 changed files with 2 additions and 1 deletions
|
@ -24,6 +24,7 @@ from aqt.qt import (
|
|||
QPixmap,
|
||||
QStyleFactory,
|
||||
Qt,
|
||||
qtmajor,
|
||||
)
|
||||
|
||||
|
||||
|
@ -266,7 +267,7 @@ class ThemeManager:
|
|||
def _apply_palette(self, app: QApplication) -> None:
|
||||
set_macos_dark_mode(self.night_mode)
|
||||
|
||||
if is_mac and not aqt.mw.pm.force_custom_styles():
|
||||
if is_mac and not (qtmajor == 5 or aqt.mw.pm.force_custom_styles()):
|
||||
app.setStyle(QStyleFactory.create(self._default_style)) # type: ignore
|
||||
self.default_palette.setColor(
|
||||
QPalette.ColorRole.Window, self.qcolor(colors.CANVAS)
|
||||
|
|
Loading…
Reference in a new issue