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.
0.17.7 already shipped -- can you add a 0.17.8, with some date such as August 16?
| "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.
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. |
| "maximum": 1 | ||
| }, | ||
| "C_Cpp.inactiveRegionFontColor": { | ||
| "type": "string", |
There was a problem hiding this comment.
The type should accept "null" as valid, since that's the default, e.g.
[
"string",
"null"
],
| "minimum": 0.1, | ||
| "maximum": 1 | ||
| }, | ||
| "C_Cpp.inactiveRegionFontColor": { |
There was a problem hiding this comment.
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
| "scope": "resource" | ||
| }, | ||
| "C_Cpp.inactiveRegionBackgroundColor": { | ||
| "type": "string", |
There was a problem hiding this comment.
this property should be string | null as well.
* inactiveRegionBackgroundColor still had string typing instead of string | null
719eb4d to
917fb82
Compare

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.