Skip to content

Commit

Permalink
Improve editor toolbar for Control nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriSizov committed Aug 16, 2022
1 parent 2e24b76 commit 7a60cc7
Show file tree
Hide file tree
Showing 5 changed files with 548 additions and 482 deletions.
11 changes: 11 additions & 0 deletions editor/editor_themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,17 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// PopupPanel
theme->set_stylebox("panel", "PopupPanel", style_popup);

Ref<StyleBoxFlat> control_editor_popup_style = style_popup->duplicate();
control_editor_popup_style->set_shadow_size(0);
control_editor_popup_style->set_default_margin(SIDE_LEFT, default_margin_size * EDSCALE);
control_editor_popup_style->set_default_margin(SIDE_TOP, default_margin_size * EDSCALE);
control_editor_popup_style->set_default_margin(SIDE_RIGHT, default_margin_size * EDSCALE);
control_editor_popup_style->set_default_margin(SIDE_BOTTOM, default_margin_size * EDSCALE);
control_editor_popup_style->set_border_width_all(0);

theme->set_stylebox("panel", "ControlEditorPopupButton", control_editor_popup_style);
theme->set_type_variation("ControlEditorPopupButton", "PopupPanel");

// SpinBox
theme->set_icon("updown", "SpinBox", theme->get_icon(SNAME("GuiSpinboxUpdown"), SNAME("EditorIcons")));
theme->set_icon("updown_disabled", "SpinBox", theme->get_icon(SNAME("GuiSpinboxUpdownDisabled"), SNAME("EditorIcons")));
Expand Down
1 change: 1 addition & 0 deletions editor/icons/ContainerLayout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion editor/icons/ControlLayout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7a60cc7

Please sign in to comment.