Categories
BLOG

win 15360

Automatically enable high contrast theme when enabled in Windows #15360

Comments

Copy link Quote reply

bpasero commented Nov 11, 2016

Newer electron version gives us API to find out if Windows runs with HC theme and also adds an event to test the change.

Some early experiments:

The only question is, do we ever expect a user to have Windows HC theme enabled but not in Code. And also the other way around.

Maybe @stevencl @bgashler1 @seanmcbreen @chrisdias have some experiences from how it works in VS.

bpasero commented Nov 11, 2016

integration.ts

windows.ts

11 of 11 tasks complete

stevencl commented Nov 11, 2016

It would seem that VS switches to high contrast theme as soon as Windows changes and then doesn’t allow you to change theme to anything else. When Windows is not in high contrast theme, it appears that you can’t set VS in high contrast and can only choose the blue, light or dark themes.

bpasero commented Nov 11, 2016

  • switch to HC theme if windows switches to HC theme while the app is running
  • switch back to the previously used theme when windows switches back
  • enable the HC theme if you start VS Code in windows HC mode

I would still allow you to pick the HC theme without running windows in HC mode. And I would also allow you to change the theme anytime away from HC even if windows is running in HC mode.

The only thing that might annoy people is the fact that we startup in HC theme when windows runs in HC mode even if the user previously maybe disabled HC theme in VS Code. Not sure if that would be an issue.

Newer electron version gives us API to find out if Windows runs with HC theme and also adds an event to test the change. Some early experiments: The only question is, do we ever expect a user to have Windows HC theme enabled but not in C…