summaryrefslogtreecommitdiff
path: root/scene/gui/popup.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-26 00:11:46 +0200
committerGitHub <noreply@github.com>2017-09-26 00:11:46 +0200
commitf577efd47ed2f0aa801155756e4ba5d5ea2d5f2b (patch)
tree05544efa89a521e0061f9ca82b57ccc69e0f5371 /scene/gui/popup.cpp
parente9e1753c3cf96015893d4d138d6f085995f00035 (diff)
parent05bb8e0c106686f2ed5a9aad0f76ecc64fa5faa0 (diff)
Merge pull request #11424 from groud/control_node_presets
Implements set_margins_preset(...)
Diffstat (limited to 'scene/gui/popup.cpp')
-rw-r--r--scene/gui/popup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 5a2a552943..1460fba89a 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -265,7 +265,7 @@ void PopupPanel::set_child_rect(Control *p_child) {
ERR_FAIL_NULL(p_child);
Ref<StyleBox> p = get_stylebox("panel");
- p_child->set_area_as_parent_rect();
+ p_child->set_anchors_and_margins_preset(Control::PRESET_WIDE);
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));