mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 15:17:12 -05:00
Improve native theme on other systems by not forcing palette
with the caveat that theme switching can get weird.
This commit is contained in:
parent
46e9c1fcd8
commit
2529edb78a
1 changed files with 4 additions and 2 deletions
|
|
@ -267,8 +267,10 @@ 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 (
|
if (
|
||||||
qtmajor == 5 or aqt.mw.pm.get_widget_style() == AnkiStyles.ANKI
|
aqt.mw.pm.get_widget_style() == AnkiStyles.NATIVE
|
||||||
|
or 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(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue