diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-26 19:07:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 19:07:34 +0100 |
commit | fc850b956b496b7bcbd09162973e03644b4e5f31 (patch) | |
tree | 1db7907fa08cd2164b631a14d88149374fe8ec65 /editor/plugins/visual_shader_editor_plugin.cpp | |
parent | bd4497db75db2e09c77b90c219f5e9006756efac (diff) | |
parent | 9cfd2ed56428fff5413d12eea9b14c30593aa879 (diff) |
Merge pull request #36563 from Chaosus/fix_resizer_color
Fix resizer icon color in VisualScripts/Shaders when graph headers is on
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 5d1a7f9efa..8766d96939 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -438,14 +438,22 @@ void VisualShaderEditor::_update_created_node(GraphNode *node) { if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) { Ref<StyleBoxFlat> sb = node->get_stylebox("frame", "GraphNode"); Color c = sb->get_border_color(); - Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0) : Color(0.0, 0.0, 0.0); + Color ic; + Color mono_color; + if (((c.r + c.g + c.b) / 3) < 0.7) { + mono_color = Color(1.0, 1.0, 1.0); + ic = Color(0.0, 0.0, 0.0, 0.7); + } else { + mono_color = Color(0.0, 0.0, 0.0); + ic = Color(1.0, 1.0, 1.0, 0.7); + } mono_color.a = 0.85; c = mono_color; node->add_color_override("title_color", c); c.a = 0.7; node->add_color_override("close_color", c); - node->add_color_override("resizer_color", c); + node->add_color_override("resizer_color", ic); } } |