Skip to content
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

auto switch of color theme based on browser API `prefers-color-scheme` #87405

Merged
merged 9 commits into from Dec 19, 2019

Conversation

@aeschli
Copy link
Contributor

aeschli commented Dec 19, 2019

Fixes #86600
Fixes #61519

This PR is competes the work from #86600

  • polish and refactoring
  • renamed settings as

'window.autoDetectColorScheme'
'workbench.preferredLightColorTheme'
'workbench.preferredDarkColorTheme'
'workbench.preferredHighConstrastColorTheme'

  • auto switching happens when
    • event is received and 'window.autoDetectColorScheme' is true
    • a change to the preferred scheme is detected on startup and 'window.autoDetectColorScheme' is true
    • an active preferred theme is changed and 'window.autoDetectColorScheme' is true

'window.autoDetectColorScheme' is currently off by default.

Thanks @muuvmuuv for the great work! Feel free to add improvements on top of this PR.

muuvmuuv and others added 8 commits Dec 9, 2019
This implements three new options to the workspace scope. One to enable/
disable the auto switch functionality and two others to set the dark
and light theme.
@aeschli aeschli self-assigned this Dec 19, 2019
@aeschli aeschli added this to the December/January 2020 milestone Dec 19, 2019
@sunriseiscool

This comment has been minimized.

Copy link

sunriseiscool commented Dec 19, 2019

where's the santa hat

@aeschli aeschli added the themes label Dec 19, 2019
@aeschli aeschli merged commit 139e59f into master Dec 19, 2019
5 checks passed
5 checks passed
linux
Details
windows
Details
darwin
Details
VS Code Distro Sync & Merge Check #20191219.20 succeeded
Details
license/cla All CLA requirements met.
Details
@aeschli aeschli deleted the aeschli/detectOSColorSchemeChanges branch Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.