diff options
| author | Rémi Verschelde | 2017-09-26 00:11:46 +0200 |
|---|---|---|
| committer | GitHub | 2017-09-26 00:11:46 +0200 |
| commit | f577efd47ed2f0aa801155756e4ba5d5ea2d5f2b (patch) | |
| tree | 05544efa89a521e0061f9ca82b57ccc69e0f5371 /scene/gui/tab_container.cpp | |
| parent | e9e1753c3cf96015893d4d138d6f085995f00035 (diff) | |
| parent | 05bb8e0c106686f2ed5a9aad0f76ecc64fa5faa0 (diff) | |
| download | godot-f577efd47ed2f0aa801155756e4ba5d5ea2d5f2b.tar.gz godot-f577efd47ed2f0aa801155756e4ba5d5ea2d5f2b.tar.zst godot-f577efd47ed2f0aa801155756e4ba5d5ea2d5f2b.zip | |
Diffstat (limited to 'scene/gui/tab_container.cpp')
| -rw-r--r-- | scene/gui/tab_container.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 98a8db336..80e12e958 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -367,7 +367,7 @@ void TabContainer::add_child_notify(Node *p_child) { current = 0; previous = 0; } - c->set_area_as_parent_rect(); + c->set_anchors_and_margins_preset(Control::PRESET_WIDE); if (tabs_visible) c->set_margin(MARGIN_TOP, _get_top_margin()); Ref<StyleBox> sb = get_stylebox("panel"); @@ -401,7 +401,7 @@ void TabContainer::set_current_tab(int p_current) { Control *c = tabs[i]; if (i == current) { c->show(); - c->set_area_as_parent_rect(); + c->set_anchors_and_margins_preset(Control::PRESET_WIDE); if (tabs_visible) c->set_margin(MARGIN_TOP, _get_top_margin()); c->set_margin(Margin(MARGIN_TOP), c->get_margin(Margin(MARGIN_TOP)) + sb->get_margin(Margin(MARGIN_TOP))); |
