mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
ignore dark mode when running from source, as it doesn't work
This commit is contained in:
parent
598ffbd340
commit
70d085f475
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
|
import sys
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
import darkdetect
|
import darkdetect
|
||||||
|
@ -20,6 +21,8 @@ class ThemeManager:
|
||||||
_icon_size = 128
|
_icon_size = 128
|
||||||
|
|
||||||
def macos_dark_mode(self) -> bool:
|
def macos_dark_mode(self) -> bool:
|
||||||
|
if not getattr(sys, "frozen", False):
|
||||||
|
return False
|
||||||
return darkdetect.isDark() is True
|
return darkdetect.isDark() is True
|
||||||
|
|
||||||
def get_night_mode(self) -> bool:
|
def get_night_mode(self) -> bool:
|
||||||
|
|
Loading…
Reference in a new issue