diff options
| author | Gilles Roudiere | 2017-08-19 19:10:00 +0200 |
|---|---|---|
| committer | Gilles Roudiere | 2017-08-19 19:10:00 +0200 |
| commit | 06256cd7782de2d91cd9ed3bcb9a05e293397303 (patch) | |
| tree | 48e2ea3efe55780838956a227ffe48ebba1bb9db /scene/gui/popup.cpp | |
| parent | 523b3c11cf6de311cc3a711ed85ee48e72330a7b (diff) | |
| download | godot-06256cd7782de2d91cd9ed3bcb9a05e293397303.tar.gz godot-06256cd7782de2d91cd9ed3bcb9a05e293397303.tar.zst godot-06256cd7782de2d91cd9ed3bcb9a05e293397303.zip | |
Some control fixes and removed useless lines
Diffstat (limited to '')
| -rw-r--r-- | scene/gui/popup.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index f2ba6bfbc..b21139f96 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -276,9 +276,10 @@ void PopupPanel::set_child_rect(Control *p_child) { Ref<StyleBox> p = get_stylebox("panel"); p_child->set_area_as_parent_rect(); - for (int i = 0; i < 4; i++) { - p_child->set_margin(Margin(i), p->get_margin(Margin(i))); - } + p_child->set_margin(MARGIN_LEFT, p->get_margin(MARGIN_LEFT)); + p_child->set_margin(MARGIN_RIGHT, -p->get_margin(MARGIN_RIGHT)); + p_child->set_margin(MARGIN_TOP, p->get_margin(MARGIN_TOP)); + p_child->set_margin(MARGIN_BOTTOM, -p->get_margin(MARGIN_BOTTOM)); } void PopupPanel::_notification(int p_what) { |
