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

Make high contrast detection configurable #17394

Merged
merged 2 commits into from
Dec 16, 2016

Conversation

geirsagberg
Copy link
Contributor

Add a new option 'window.autoDetectHighContrast', defaults to true. If false, VS Code theme will ignore Windows High Contrast theme.

Fixes #17279

@msftclas
Copy link

Hi @geirsagberg, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing trailing comma.

this.themeService.setColorTheme(VS_HC_THEME, false);
});
const windowConfig = this.configurationService.getConfiguration<IWindowSettings>('window');
if (windowConfig.autoDetectHighContrast) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

windowConfig can be null

this.partService.joinCreation().then(() => {
this.themeService.setColorTheme(VS_DARK_THEME, false);
});
const windowConfig = this.configurationService.getConfiguration<IWindowSettings>('window');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have expanded the setting description. I feel if this settings is disabled, nothing should happen automatically when changing to/from windows HC theme.

@bpasero bpasero self-assigned this Dec 16, 2016
@bpasero bpasero added this to the January 2017 milestone Dec 16, 2016
@geirsagberg
Copy link
Contributor Author

I have signed the CLA; do I need to do anything to make the bot accept it?

@bpasero
Copy link
Member

bpasero commented Dec 16, 2016

@geirsagberg I think it can take some minutes to be picked up 👍

@msftgits
Copy link

Hi, I am closing and re-opening this PR to bump the CLA bot. Sorry for the inconvenience!

@msftgits msftgits closed this Dec 16, 2016
@msftgits msftgits reopened this Dec 16, 2016
@msftclas
Copy link

Hi @geirsagberg, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.

TTYL, MSBOT;

@bpasero
Copy link
Member

bpasero commented Dec 16, 2016

LGTM, thanks for the prompt fix.

@bpasero bpasero merged commit a0f4983 into microsoft:master Dec 16, 2016
@geirsagberg geirsagberg deleted the 17279_disable_highContrast branch December 20, 2016 10:43
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a setting to disable Auto-Detection of High Contrast
4 participants