diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-08 22:39:09 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-08 22:39:09 +0100 |
commit | 30b3434daacc708276d13fbc0ff04f32e19a1d24 (patch) | |
tree | 4a52c76802ad1a91eeb960c4e19269162e15278f | |
parent | 0d6fede757057979620188a2cf779b041c453187 (diff) | |
parent | 5ce488b1fc0c51c8df0cfab9d26b7f4be08b147f (diff) |
Merge pull request #71036 from Calinou/shader-editor-tweak-disabled-branch-color
Tweak text color for disabled preprocessor branches in the shader editor
-rw-r--r-- | editor/plugins/text_shader_editor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp index cd160f8b14..1b29999796 100644 --- a/editor/plugins/text_shader_editor.cpp +++ b/editor/plugins/text_shader_editor.cpp @@ -301,7 +301,9 @@ void ShaderTextEditor::_load_theme_settings() { syntax_highlighter->clear_color_regions(); syntax_highlighter->add_color_region("/*", "*/", comment_color, false); 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->add_comment_delimiter("/*", "*/", false); |