Skip to content

Commit a8ebeb4

Browse files
committed
Merge pull request godotengine#114501 from passivestar/node-separators
Fix visibility of shader node separators in modern theme
2 parents c1e1314 + 6592147 commit a8ebeb4

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

editor/shader/visual_shader_editor_plugin.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,9 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
10571057
}
10581058

10591059
if (vsnode->is_port_separator(i)) {
1060-
node->add_child(memnew(HSeparator));
1060+
HSeparator *separator = memnew(HSeparator);
1061+
separator->add_theme_style_override("separator", editor->get_theme_stylebox("separator", "GraphNode"));
1062+
node->add_child(separator);
10611063
port_offset++;
10621064
}
10631065

editor/themes/theme_classic.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,8 @@ void ThemeClassic::populate_standard_styles(const Ref<EditorTheme> &p_theme, Edi
14301430
p_theme->set_stylebox("slot", "GraphNode", gn_slot_style);
14311431
p_theme->set_stylebox("slot_selected", "GraphNode", p_config.button_style_focus);
14321432

1433+
p_theme->set_stylebox("separator", "GraphNode", p_theme->get_stylebox("separator", "HSeparator"));
1434+
14331435
p_theme->set_color("resizer_color", "GraphNode", gn_decoration_color);
14341436

14351437
p_theme->set_constant("port_h_offset", "GraphNode", 1);

editor/themes/theme_modern.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,6 +1435,9 @@ void ThemeModern::populate_standard_styles(const Ref<EditorTheme> &p_theme, Edit
14351435
p_theme->set_stylebox("slot", "GraphNode", gn_slot_style);
14361436
p_theme->set_stylebox("slot_selected", "GraphNode", p_config.focus_style);
14371437

1438+
const Color gn_separator_color = gn_frame_bg.lerp(p_config.mono_color, 0.1);
1439+
p_theme->set_stylebox("separator", "GraphNode", EditorThemeManager::make_line_stylebox(gn_separator_color, Math::round(2 * EDSCALE)));
1440+
14381441
p_theme->set_color("resizer_color", "GraphNode", gn_decoration_color);
14391442

14401443
p_theme->set_constant("port_h_offset", "GraphNode", 1);

0 commit comments

Comments
 (0)