diff options
author | Yuri Sizov <yuris@humnom.net> | 2022-07-23 01:28:05 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2022-08-16 17:36:16 +0300 |
commit | 7a60cc7737e39ce9725b2c25fb522a9706ccd2ca (patch) | |
tree | 29457f0f2ed64ce3f7f594e16c96cd34a787993c /editor/editor_themes.cpp | |
parent | 2e24b76535dceb9cf18ab8ece3304ed92948c1b5 (diff) | |
download | redot-engine-7a60cc7737e39ce9725b2c25fb522a9706ccd2ca.tar.gz |
Improve editor toolbar for Control nodes
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index c58d1263f3..2d034666af 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -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"))); |