Skip to content

Update theme detection to use activeColorTheme API #4291

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

zetaloop
Copy link

Replaced the use of workbench.colorTheme with the newer window.activeColorTheme.kind API.

This change improves compatibility with VSCode's "Window: Auto Detect Color Scheme" setting.
When that setting is enabled, VSCode does not update workbench.colorTheme, but instead uses preferredDarkColorTheme or preferredLightColorTheme internally.
As a result, relying on colorTheme alone may no longer reflect the actual active theme.

The new API correctly reflects the effective color theme at runtime, ensuring PlatformIO Home applies the appropriate light/dark mode on load.

Before
Before

After
After

@CLAassistant
Copy link

CLAassistant commented Apr 22, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants