diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2020-07-28 21:39:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-28 21:39:12 +0300 |
commit | af598858c7a98695c2c0f78c515a5279538874c8 (patch) | |
tree | f5666c927ca3ea41d84f4d3a5b702d784d913bfc | |
parent | a1ca21f46d41d5528bb43ba15f2f370d78a823c4 (diff) | |
parent | a33171ad236bfad49f9d7eeb6f12366c395c2e18 (diff) |
Merge pull request #40802 from Chaosus/vs_fix_preview_color
Fix functions name color in visual shader code preview and expressions
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 5473b0c284..660d994f67 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -873,6 +873,7 @@ void VisualShaderEditor::_update_graph() { Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color"); Color comment_color = EDITOR_GET("text_editor/highlighting/comment_color"); Color symbol_color = EDITOR_GET("text_editor/highlighting/symbol_color"); + Color function_color = EDITOR_GET("text_editor/highlighting/function_color"); expression_box->set_syntax_highlighter(expression_syntax_highlighter); expression_box->add_theme_color_override("background_color", background_color); @@ -884,6 +885,7 @@ void VisualShaderEditor::_update_graph() { expression_box->add_theme_font_override("font", get_theme_font("expression", "EditorFonts")); expression_box->add_theme_color_override("font_color", text_color); expression_syntax_highlighter->set_symbol_color(symbol_color); + expression_syntax_highlighter->set_function_color(function_color); expression_syntax_highlighter->add_color_region("/*", "*/", comment_color, false); expression_syntax_highlighter->add_color_region("//", "", comment_color, false); @@ -1740,6 +1742,7 @@ void VisualShaderEditor::_notification(int p_what) { Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color"); Color comment_color = EDITOR_GET("text_editor/highlighting/comment_color"); Color symbol_color = EDITOR_GET("text_editor/highlighting/symbol_color"); + Color function_color = EDITOR_GET("text_editor/highlighting/function_color"); preview_text->add_theme_color_override("background_color", background_color); @@ -1750,6 +1753,7 @@ void VisualShaderEditor::_notification(int p_what) { preview_text->add_theme_font_override("font", get_theme_font("expression", "EditorFonts")); preview_text->add_theme_color_override("font_color", text_color); syntax_highlighter->set_symbol_color(symbol_color); + syntax_highlighter->set_function_color(function_color); syntax_highlighter->clear_color_regions(); syntax_highlighter->add_color_region("/*", "*/", comment_color, false); syntax_highlighter->add_color_region("//", "", comment_color, false); |