mirror of
https://github.com/ankitects/anki.git
synced 2026-01-05 18:13:56 -05:00
Merge c9c426ac4f into 8f2144534b
This commit is contained in:
commit
3a53f58f48
1 changed files with 0 additions and 8 deletions
|
|
@ -919,14 +919,6 @@ html {{ {font} }}
|
|||
def on_theme_did_change(self) -> None:
|
||||
# avoid flashes if page reloaded
|
||||
self.page().setBackgroundColor(theme_manager.qcolor(colors.CANVAS))
|
||||
if hasattr(QWebEngineSettings.WebAttribute, "ForceDarkMode"):
|
||||
force_dark_mode = getattr(QWebEngineSettings.WebAttribute, "ForceDarkMode")
|
||||
page_settings = self.page().settings()
|
||||
if page_settings is not None:
|
||||
page_settings.setAttribute(
|
||||
force_dark_mode,
|
||||
theme_manager.get_night_mode(),
|
||||
)
|
||||
# update night-mode class, and legacy nightMode/night-mode body classes
|
||||
self.eval(
|
||||
f"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue