REVERT(#3622): ForceDarkMode interferes with ankis native dark theme

This commit is contained in:
GithubAnon0000 2025-12-31 19:21:25 +01:00
parent 8f2144534b
commit c9c426ac4f

View file

@ -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"""