Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit913f740

Browse files
john-pattersonsean-mcmanus
authored andcommitted
adds settings for inactive region font & bg color (microsoft#2308)
* adds settings for inactive region font & bg colorThis adds the inactiveRegionForegroundColor and inactiveRegionBackgroundColorsettings. If a preprocessor block is found to be inactive, it will becolored by these fields if they are set. They accept hexadecimal fontstrings or valid theme colors as their values.These fields alsointeractive with the dimInactiveRegions setting.This was requested in issuemicrosoft#2212.
1 parent2cbc90d commit913f740

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

‎Extension/CHANGELOG.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#C/C++ for Visual Studio Code Change Log
22

3-
##Version 0.17.7: July 19, 2018
3+
##Version 0.17.8: August 16, 2018
4+
* Add`inactiveRegionForegroundColor` and`inactiveRegionBackgroundColor` to settings.[#2212](https://github.com/Microsoft/vscode-cpptools/issues/2212)
5+
6+
##Version 0.17.7: July 22, 2018
47
* Fix`Go to Definition` for code scoped with an aliased namespace.[#387](https://github.com/Microsoft/vscode-cpptools/issues/387)
58
* Fix incorrect IntelliSense errors with template template-arguments.[#1014](https://github.com/Microsoft/vscode-cpptools/issues/1014)
69
* Fix crash when using designated initializer lists.[#1440](https://github.com/Microsoft/vscode-cpptools/issues/1440)

‎Extension/package.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,24 @@
154154
"minimum":0.1,
155155
"maximum":1
156156
},
157+
"C_Cpp.inactiveRegionForegroundColor": {
158+
"type": [
159+
"string",
160+
"null"
161+
],
162+
"default":null,
163+
"description":"Controls the font coloring of inactive preprocessor blocks. Input is in the form a hexadecimal 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.",
164+
"scope":"resource"
165+
},
166+
"C_Cpp.inactiveRegionBackgroundColor": {
167+
"type": [
168+
"string",
169+
"null"
170+
],
171+
"default":null,
172+
"description":"Controls the background coloring of inactive preprocessor blocks. Input is in the form a hexadecimal color code or a valid Theme Color. If not set, this defaults to transparent. This setting only applies when inactive region dimming is enabled.",
173+
"scope":"resource"
174+
},
157175
"C_Cpp.formatting": {
158176
"type":"string",
159177
"enum": [

‎Extension/src/LanguageServer/client.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,8 @@ class DefaultClient implements Client {
840840

841841
letdecoration:vscode.TextEditorDecorationType=vscode.window.createTextEditorDecorationType({
842842
opacity:settings.inactiveRegionOpacity.toString(),
843+
backgroundColor:settings.inactiveRegionBackgroundColor,
844+
color:settings.inactiveRegionForegroundColor,
843845
rangeBehavior:vscode.DecorationRangeBehavior.ClosedOpen
844846
});
845847

‎Extension/src/LanguageServer/settings.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export class CppSettings extends Settings {
4141
publicgeterrorSquiggles():string{returnsuper.Section.get<string>("errorSquiggles");}
4242
publicgetdimInactiveRegions():boolean{returnsuper.Section.get<boolean>("dimInactiveRegions");}
4343
publicgetinactiveRegionOpacity():number{returnsuper.Section.get<number>("inactiveRegionOpacity");}
44+
publicgetinactiveRegionForegroundColor():string{returnsuper.Section.get<string>("inactiveRegionForegroundColor");}
45+
publicgetinactiveRegionBackgroundColor():string{returnsuper.Section.get<string>("inactiveRegionBackgroundColor");}
4446
publicgetautoComplete():string{returnsuper.Section.get<string>("autocomplete");}
4547
publicgetloggingLevel():string{returnsuper.Section.get<string>("loggingLevel");}
4648
publicgetnavigationLength():number{returnsuper.Section.get<number>("navigation.length",60);}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp