TabContainer now reports proper minimum size, closes #4896

(cherry picked from commit 65bcde0a7d)
This commit is contained in:
Juan Linietsky 2016-06-17 18:38:40 -03:00 committed by Rémi Verschelde
parent 7b36595641
commit 775b089548
1 changed files with 6 additions and 3 deletions

View File

@ -700,13 +700,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);
}
@ -718,6 +718,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;
}