From 6592147892ff9c89dd03e11f936614dcc0c9c020 Mon Sep 17 00:00:00 2001 From: passivestar <60579014+passivestar@users.noreply.github.com> Date: Thu, 1 Jan 2026 19:39:54 +0400 Subject: [PATCH] Fix visibility of shader node separators in modern theme --- editor/shader/visual_shader_editor_plugin.cpp | 4 +++- editor/themes/theme_classic.cpp | 2 ++ editor/themes/theme_modern.cpp | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/editor/shader/visual_shader_editor_plugin.cpp b/editor/shader/visual_shader_editor_plugin.cpp index fd049870fd0..cd3d0c8d91e 100644 --- a/editor/shader/visual_shader_editor_plugin.cpp +++ b/editor/shader/visual_shader_editor_plugin.cpp @@ -1057,7 +1057,9 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool } if (vsnode->is_port_separator(i)) { - node->add_child(memnew(HSeparator)); + HSeparator *separator = memnew(HSeparator); + separator->add_theme_style_override("separator", editor->get_theme_stylebox("separator", "GraphNode")); + node->add_child(separator); port_offset++; } diff --git a/editor/themes/theme_classic.cpp b/editor/themes/theme_classic.cpp index 7301d43c8a4..dcee5f939c4 100644 --- a/editor/themes/theme_classic.cpp +++ b/editor/themes/theme_classic.cpp @@ -1430,6 +1430,8 @@ void ThemeClassic::populate_standard_styles(const Ref &p_theme, Edi p_theme->set_stylebox("slot", "GraphNode", gn_slot_style); p_theme->set_stylebox("slot_selected", "GraphNode", p_config.button_style_focus); + p_theme->set_stylebox("separator", "GraphNode", p_theme->get_stylebox("separator", "HSeparator")); + p_theme->set_color("resizer_color", "GraphNode", gn_decoration_color); p_theme->set_constant("port_h_offset", "GraphNode", 1); diff --git a/editor/themes/theme_modern.cpp b/editor/themes/theme_modern.cpp index e4c61de8cf8..6bbad9b9ac0 100644 --- a/editor/themes/theme_modern.cpp +++ b/editor/themes/theme_modern.cpp @@ -1435,6 +1435,9 @@ void ThemeModern::populate_standard_styles(const Ref &p_theme, Edit p_theme->set_stylebox("slot", "GraphNode", gn_slot_style); p_theme->set_stylebox("slot_selected", "GraphNode", p_config.focus_style); + const Color gn_separator_color = gn_frame_bg.lerp(p_config.mono_color, 0.1); + p_theme->set_stylebox("separator", "GraphNode", EditorThemeManager::make_line_stylebox(gn_separator_color, Math::round(2 * EDSCALE))); + p_theme->set_color("resizer_color", "GraphNode", gn_decoration_color); p_theme->set_constant("port_h_offset", "GraphNode", 1);