This commit is contained in:
Matthias Metelka 2023-01-16 09:37:31 +01:00
parent 792b834109
commit 46e9c1fcd8

View file

@ -267,7 +267,9 @@ class ThemeManager:
def _apply_palette(self, app: QApplication) -> None: def _apply_palette(self, app: QApplication) -> None:
set_macos_dark_mode(self.night_mode) set_macos_dark_mode(self.night_mode)
if is_mac and not (qtmajor == 5 or aqt.mw.pm.get_widget_style() == AnkiStyles.ANKI): if is_mac and not (
qtmajor == 5 or aqt.mw.pm.get_widget_style() == AnkiStyles.ANKI
):
app.setStyle(QStyleFactory.create(self._default_style)) # type: ignore app.setStyle(QStyleFactory.create(self._default_style)) # type: ignore
self.default_palette.setColor( self.default_palette.setColor(
QPalette.ColorRole.Window, self.qcolor(colors.CANVAS) QPalette.ColorRole.Window, self.qcolor(colors.CANVAS)