-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
window.systemColorTheme
conflicts with window.autoDetectColorScheme
#210902
Comments
@bpasero FYI |
window.autoDetectColorScheme
window.systemColorTheme
conflicts with window.autoDetectColorScheme
Looks like b is not an option as setting |
Ideally Electron would untangle the API that allows to detect the OS color scheme (mode) from the configuration of the Windows color mode. @deepak1556 |
Maybe we just rename |
The problem with |
I now clarified in the settings descriptions that Also I renamed |
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: