Steps to Reproduce:
window.autoDetectColorScheme to true
Does this issue occur when all extensions are disabled?: Yes/No
VS Code insiders, fresh profile.
Version: 1.43.0-insider
Commit: e6a45f4242ebddb7aa9a229f85555e8a3bd987e2
Date: 2020-02-21T05:40:52.685Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.20-200.fc31.x86_64
I did some debugging, this is where the magic happens.
Unfortunately, window.matchMedia((prefers-color-scheme: light)).matches === true and window.matchMedia((prefers-color-scheme: dark)).matches === false regardless of my system theme.
This is maybe a Chromium bug since the same wrong values are returned in Chromium but the right values are returned in Firefox. On the other hand, Chromium does auto-switch its color theme.
Also there's a nativeTheme Electron API. What does that have to do with this?
I tested the nativeTheme API and it also returns the wrong (always light theme) value on Linux. :crying_cat_face:
Thanks for digging up the links. We will have to wait for Chromium to have the feature.
In the meantime I can disable the feature for Linux or add a remark to the description, if that's any help.
Tested with VSCode 1.50.1 on (Ubuntu) GNOME 3.26.3: It works when launching the editor but will not change when the theme is switched while the editor is open.
I'm getting the same behaviour as @Siilwyn
When I close VSCode, I can get the theme to toggle between light and dark, but since VSCode is basically always open this doesn't really help.
Any suggestions on how to get this to work without closing VScode though? Even a command line workaround would be fine...
As mentioned, we're waiting for Electron/Chromium support to detect os color scheme changes. There's no workaround yet.
Most helpful comment
Tested with VSCode 1.50.1 on (Ubuntu) GNOME 3.26.3: It works when launching the editor but will not change when the theme is switched while the editor is open.