You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Tweak text color for disabled preprocessor branches in the shader editor
This makes text within disabled branches easier to distinguish from comments when using a non-default editor syntax theme. (The default editor syntax theme uses the same color as the text with 50% opacity for comments, which means it looks the exact same.)
This commit is contained in:
@@ -301,7 +301,9 @@ void ShaderTextEditor::_load_theme_settings() {
|
|||||||
syntax_highlighter->clear_color_regions();
|
syntax_highlighter->clear_color_regions();
|
||||||
syntax_highlighter->add_color_region("/*", "*/", comment_color, false);
|
syntax_highlighter->add_color_region("/*", "*/", comment_color, false);
|
||||||
syntax_highlighter->add_color_region("//", "", comment_color, true);
|
syntax_highlighter->add_color_region("//", "", comment_color, true);
|
||||||
syntax_highlighter->set_disabled_branch_color(comment_color);
|
|
||||||
|
// Disabled preprocessor branches use translucent text color to be easier to distinguish from comments.
|
||||||
|
syntax_highlighter->set_disabled_branch_color(Color(EDITOR_GET("text_editor/theme/highlighting/text_color")) * Color(1, 1, 1, 0.5));
|
||||||
|
|
||||||
te->clear_comment_delimiters();
|
te->clear_comment_delimiters();
|
||||||
te->add_comment_delimiter("/*", "*/", false);
|
te->add_comment_delimiter("/*", "*/", false);
|
||||||
|
|||||||
Reference in New Issue
Block a user