summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-17 18:38:40 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-17 18:38:40 -0300
commit65bcde0a7d837bcfc98d37734806caa1f894a36d (patch)
tree90ed5a637da94e6a63e4ecfbb4dc06e4ea4a5f6d /scene
parent95dc15b75096b7f4017b16ddae9066ee2deb3934 (diff)
TabContainer now reports proper minimum size, closes #4896
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/tab_container.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index d19e5f0d60..37c68a295d 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -704,13 +704,13 @@ Size2 TabContainer::get_minimum_size() const {
if (c->is_set_as_toplevel())
continue;
- if (!c->has_meta("_tab_name"))
- continue;
+ //if (!c->has_meta("_tab_name"))
+ // continue;
if (!c->is_visible())
continue;
- Size2 cms = c->get_minimum_size();
+ Size2 cms = c->get_combined_minimum_size();
ms.x=MAX(ms.x,cms.x);
ms.y=MAX(ms.y,cms.y);
}
@@ -722,6 +722,9 @@ Size2 TabContainer::get_minimum_size() const {
ms.y+=MAX(tab_bg->get_minimum_size().y,tab_fg->get_minimum_size().y);
ms.y+=font->get_height();
+ Ref<StyleBox> sb = get_stylebox("panel");
+ ms+=sb->get_minimum_size();
+
return ms;
}