Make high contrast detection configurable#17394
Conversation
|
Hi @geirsagberg, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
bpasero
left a comment
There was a problem hiding this comment.
@geirsagberg very cool, only minor feedback!
| 'type': 'boolean', | ||
| 'default': true, | ||
| 'description': nls.localize('autoDetectHighContrast', "If enabled, will automatically change to high contrast theme if Windows is using a high contrast theme.") | ||
| } |
| this.themeService.setColorTheme(VS_HC_THEME, false); | ||
| }); | ||
| const windowConfig = this.configurationService.getConfiguration<IWindowSettings>('window'); | ||
| if (windowConfig.autoDetectHighContrast) { |
| this.partService.joinCreation().then(() => { | ||
| this.themeService.setColorTheme(VS_DARK_THEME, false); | ||
| }); | ||
| const windowConfig = this.configurationService.getConfiguration<IWindowSettings>('window'); |
There was a problem hiding this comment.
I think we can ignore the setting in this case because leaving HC on Windows you want to switch back to dark theme. Or otherwise the setting should be clearer that it prevents switching in both ways, not just from normal to HC theme.
There was a problem hiding this comment.
I have expanded the setting description. I feel if this settings is disabled, nothing should happen automatically when changing to/from windows HC theme.
|
I have signed the CLA; do I need to do anything to make the bot accept it? |
|
@geirsagberg I think it can take some minutes to be picked up 👍 |
|
Hi, I am closing and re-opening this PR to bump the CLA bot. Sorry for the inconvenience! |
|
Hi @geirsagberg, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
|
LGTM, thanks for the prompt fix. |
Add a new option 'window.autoDetectHighContrast', defaults to true. If false, VS Code theme will ignore Windows High Contrast theme.
Fixes #17279