-
Notifications
You must be signed in to change notification settings - Fork 1.7k
adds settings for inactive region font & bg color #2308
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
adds settings for inactive region font & bg color #2308
Conversation
This adds the inactiveRegionFontColor and inactiveRegionBackgroundColor settings. If a preprocessor block is found to be inactive, it will be colored by these fields if they are set. They accept hexadecimal font strings or valid theme colors as their values.These fields also interactive with the dimInactiveRegions setting. This was requested in issue microsoft#2212.
| # C/C++ for Visual Studio Code Change Log | ||
|
|
||
| ## Version 0.17.7: July 19, 2018 | ||
| ## Version 0.17.7: July 22, 2018 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.17.7 already shipped -- can you add a 0.17.8, with some date such as August 16?
Extension/package.json
Outdated
| "C_Cpp.inactiveRegionFontColor": { | ||
| "type": "string", | ||
| "default": null, | ||
| "description": "Controls the font coloring of inactive preprocessor blocks. Input is in the form a hexidecimal color code or a valid Theme Color. If not set, this defaults to the syntax coloring scheme of the editor. This setting only applies when inactive region dimming is enabled.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "hexadecimal".
|
I think the tests are run as part of the GitHub Travis CI so you don't have to run it locally. |
Extension/package.json
Outdated
| "maximum": 1 | ||
| }, | ||
| "C_Cpp.inactiveRegionFontColor": { | ||
| "type": "string", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type should accept "null" as valid, since that's the default, e.g.
[
"string",
"null"
],
Extension/package.json
Outdated
| "minimum": 0.1, | ||
| "maximum": 1 | ||
| }, | ||
| "C_Cpp.inactiveRegionFontColor": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be "inactiveRegionForegroundColor"? VS Code seems to use the foreground instead of font term: https://code.visualstudio.com/docs/getstarted/theme-color-reference .
|
We do plan to rename a bunch of settings in the future. I'll add this one to the list. I'd rather do it all at once. |
* Cleanup CHANGELOG to new release * FontColor -> ForegroundColor * hexidecimal -> hexadecimal * fixing inactiveRegionForegroundColor typing
1cb7dd5 to
55f6695
Compare
Extension/package.json
Outdated
| "scope": "resource" | ||
| }, | ||
| "C_Cpp.inactiveRegionBackgroundColor": { | ||
| "type": "string", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this property should be string | null as well.
* inactiveRegionBackgroundColor still had string typing instead of string | null
719eb4d to
917fb82
Compare
sean-mcmanus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot 👍

This adds the inactiveRegionFontColor and inactiveRegionBackgroundColor
settings. If a preprocessor block is found to be inactive, it will be
colored by these fields if they are set. They accept hexadecimal font
strings or valid theme colors as their values.These fields also
interactive with the dimInactiveRegions setting.
This was requested in issue
#2212.
I tried launching the tests, but they crashed for me with error
Error: Cannot find module 'C:\Users\John\Projects\vscode-cpptools\Extension\out\test'but I don't think this is related to my change.I also feel like
dimInactiveRegionsshould now be changes tocolorizeInactiveRegionsas this verb change captures both changes in opacity and color, but I wanted to get input before I made a user-facing alteration.