Merge pull request #114501 from passivestar/node-separators
Fix visibility of shader node separators in modern theme
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
@@ -1430,6 +1430,8 @@ void ThemeClassic::populate_standard_styles(const Ref<EditorTheme> &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);
|
||||
|
||||
@@ -1435,6 +1435,9 @@ void ThemeModern::populate_standard_styles(const Ref<EditorTheme> &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);
|
||||
|
||||
Reference in New Issue
Block a user