-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Dark mode doesn't switch on and off when the OS automatically switches #158314
Comments
Did you set |
Yes I did. The colour changes as it should if I change the OS colour scheme manually, but if the colour scheme automatically changes while the screen is locked, e.g I leave for dinner when it's in light mode, but when I unlock my screen that night OS has switched to dark mode, VSCode does not change its colour scheme. The workaround is I change the OS scheme to light and back to dark; then VSCode picks it up. |
Having the same issue, will try the OS theme workaround! |
This is vey likely an Electron issue. VS Code listens to the OS color theme changes that come from Electron, and I suspect one is missing while the screen is locked. I you have a chance (and have node and git installed on your machine), can you validate my theory by running this:
|
Having same problem |
I see vscode did also adjust. Still, some behavior has changed. If vscode wasn't listening to the change, it remains in the last active theme even after shutdown and restart. |
The latest release 1.78 seems to have fixed this |
@jamieorc, I'm on |
I am facing the same issue and I am on the latest version as of this post:
|
This just happened to me as well @aeschli. Unsure what caused it. Restarting VS Code didn't help. To fix it, I unset |
Yes, the autoDetectColorScheme needs to be reset. |
This is the same for me too. I tend to see the opposite in that I turn my mac on in the morning and while OS and all other apps have gone back into light mode to match the OS, VSCode and VSCode Insiders stay in dark mode. My workaround is to go into the macOS System Settings. Appearance and toggle from Auto to Dark then Light which forces the change then back to Auto VSCode:
VSCode Insiders:
I think I have the correct settings in VSCode: |
This is happening to me everyday and I always have to go and uncheck and recheck the auto detect color scheme box for it to switch. Vs code version info below: Version: 1.85.1 (Universal) |
Same for me. macOS Sonoma (latest updates) and VSCode: |
What helped for me was to open up the settings.json manually and changing some lines. It was like this: {
"window.systemColorTheme": "auto",
"window.autoDetectColorScheme": true,
}
I removed the {
"window.autoDetectColorScheme": true,
"workbench.colorTheme": "Default Light Modern",
} |
@gsimons-nzme you are right. Now the problem seems fixed! I think that should be included in the app, to solve definitely this issue on Mac. |
Seems like VSCode should remove the |
Is there a reason that |
+1 for me just removing this line was the fix:
|
I created #210902 for the issue with |
Marking as fixed. I made the following changes:
|
Nice work @aeschli 👏 |
Marking as fixed. |
Type: Bug
You'll have to manually switch macOS back to light mode and back again to dark mode for Code to pick up teh dark mode.
VS Code version: Code 1.70.1 (Universal) (6d9b74a, 2022-08-10T06:09:06.916Z)
OS version: Darwin arm64 21.6.0
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (30)
(3 theme extensions excluded)
A/B Experiments
The text was updated successfully, but these errors were encountered: