Add GraphFrame and integrate it in VisualShader

This commit is contained in:
Hendrik Brucker
2024-02-07 02:37:26 +01:00
parent 7a42afbba0
commit a81561cbd9
25 changed files with 1996 additions and 298 deletions

View File

@@ -757,6 +757,36 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("shadow_outline_size", "GraphNodeTitleLabel", Math::round(1 * scale));
theme->set_constant("line_spacing", "GraphNodeTitleLabel", Math::round(3 * scale));
// GraphFrame
Ref<StyleBoxFlat> graphframe_sb = make_flat_stylebox(style_pressed_color, 18, 12, 18, 12, 3, true, 2);
graphframe_sb->set_expand_margin(SIDE_TOP, 38 * scale);
graphframe_sb->set_border_color(style_pressed_color);
Ref<StyleBoxFlat> graphframe_sb_selected = graphframe_sb->duplicate();
graphframe_sb_selected->set_border_color(style_hover_color);
theme->set_stylebox("panel", "GraphFrame", graphframe_sb);
theme->set_stylebox("panel_selected", "GraphFrame", graphframe_sb_selected);
theme->set_stylebox("titlebar", "GraphFrame", make_empty_stylebox(4, 4, 4, 4));
theme->set_stylebox("titlebar_selected", "GraphFrame", make_empty_stylebox(4, 4, 4, 4));
theme->set_icon("resizer", "GraphFrame", icons["resizer_se"]);
theme->set_color("resizer_color", "GraphFrame", control_font_color);
// GraphFrame's title Label
theme->set_type_variation("GraphFrameTitleLabel", "Label");
theme->set_stylebox("normal", "GraphFrameTitleLabel", memnew(StyleBoxEmpty));
theme->set_font_size("font_size", "GraphFrameTitleLabel", 22);
theme->set_color("font_color", "GraphFrameTitleLabel", Color(1, 1, 1));
theme->set_color("font_shadow_color", "GraphFrameTitleLabel", Color(0, 0, 0, 0));
theme->set_color("font_outline_color", "GraphFrameTitleLabel", Color(1, 1, 1));
theme->set_constant("shadow_offset_x", "GraphFrameTitleLabel", 1 * scale);
theme->set_constant("shadow_offset_y", "GraphFrameTitleLabel", 1 * scale);
theme->set_constant("outline_size", "GraphFrameTitleLabel", 0);
theme->set_constant("shadow_outline_size", "GraphFrameTitleLabel", 1 * scale);
theme->set_constant("line_spacing", "GraphFrameTitleLabel", 3 * scale);
// Tree
theme->set_stylebox("panel", "Tree", make_flat_stylebox(style_normal_color, 4, 4, 4, 5));