window.systemColorTheme
conflicts with window.autoDetectColorScheme
#210902
Labels
Milestone
window.systemColorTheme
conflicts with window.autoDetectColorScheme
#210902
Setting 'window.systemColorTheme' to anything else than
default
, will causewindow.autoDetectColorScheme
to no longer work.Internally it sets
nativeTheme.themeSource
which hard codenativeTheme.shouldUseDarkColors
andprefers-color-scheme
and disable the update event which we use to detect the current OS scheme event.Solutions:
a. we disable
window.systemColorTheme
ifwindow.autoDetectColorScheme
is enabled. Disadvantage: This will no longer allow to redefine the color of context menus / menus and frames whenwindow.autoDetectColorScheme
is onb. we no longer use the Electron API to detect light/dark color schemes but use CSS (`(prefers-color-scheme: light)``.
The problem here is that this will cause some rewrite. We can only get the value when we have a window, while before we could access that value in main and already initialize some window colors
The text was updated successfully, but these errors were encountered: