You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
window.systemColorTheme conflicts with window.autoDetectColorScheme #210902
Setting 'window.systemColorTheme' to anything else than default, will cause window.autoDetectColorScheme to no longer work.
Internally it sets nativeTheme.themeSource which hard codenativeTheme.shouldUseDarkColors and prefers-color-scheme and disable the update event which we use to detect the current OS scheme event.
Solutions:
a. we disable window.systemColorTheme if window.autoDetectColorScheme is enabled. Disadvantage: This will no longer allow to redefine the color of context menus / menus and frames when window.autoDetectColorScheme is on
b. 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
changed the title [-]'window.systemColorTheme' conflicts with `window.autoDetectColorScheme`[/-][+]`window.systemColorTheme` conflicts with `window.autoDetectColorScheme`[/+]on Apr 22, 2024
Ideally Electron would untangle the API that allows to detect the OS color scheme (mode) from the configuration of the Windows color mode. Robo (@deepak1556)
Activity
aeschli commentedon Apr 22, 2024
Benjamin Pasero (@bpasero) FYI
[-]'window.systemColorTheme' conflicts with `window.autoDetectColorScheme`[/-][+]`window.systemColorTheme` conflicts with `window.autoDetectColorScheme`[/+]aeschli commentedon Apr 22, 2024
Looks like b is not an option as setting
nativeTheme.themeSourcwill define whatwindow.matchMedia((prefers-color-scheme: light)).matchesreturnsaeschli commentedon Apr 22, 2024
Ideally Electron would untangle the API that allows to detect the OS color scheme (mode) from the configuration of the Windows color mode. Robo (@deepak1556)
aeschli commentedon Apr 22, 2024
Maybe we just rename
window.systemColorTheme: autoto 'match theme'aeschli commentedon Apr 22, 2024
The problem with
window.systemColorTheme: autois that we can configure a theme per window.aeschli commentedon Apr 22, 2024
I now clarified in the settings descriptions that
window.autoDetectColorSchemeis ignored ifwindow.systemColorThemehardcodes a system color.Also I renamed
window.systemColorTheme: autotowindow.systemColorTheme: matchColorTheme(PR: #210923)