don't pick up system dark theme in -alternate Mac build
The older Qt doesn't support it properly
This commit is contained in:
parent
364f4152a8
commit
0fae85d2b4
@ -9,7 +9,8 @@ from typing import Dict
|
|||||||
from anki.utils import isMac
|
from anki.utils import isMac
|
||||||
from aqt import QApplication, gui_hooks, isWin
|
from aqt import QApplication, gui_hooks, isWin
|
||||||
from aqt.colors import colors
|
from aqt.colors import colors
|
||||||
from aqt.qt import QColor, QIcon, QPalette, QPixmap, QStyleFactory, Qt
|
from aqt.qt import QColor, QIcon, QPalette, QPixmap, QStyleFactory, Qt, \
|
||||||
|
qtminor
|
||||||
|
|
||||||
|
|
||||||
class ThemeManager:
|
class ThemeManager:
|
||||||
@ -23,6 +24,8 @@ class ThemeManager:
|
|||||||
return False
|
return False
|
||||||
if not isMac:
|
if not isMac:
|
||||||
return False
|
return False
|
||||||
|
if qtminor < 14:
|
||||||
|
return False
|
||||||
import darkdetect # pylint: disable=import-error
|
import darkdetect # pylint: disable=import-error
|
||||||
|
|
||||||
return darkdetect.isDark() is True
|
return darkdetect.isDark() is True
|
||||||
|
Loading…
Reference in New Issue
Block a user