From 775b08954836eeae56bc221bd91d265521ec56dd Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 17 Jun 2016 18:38:40 -0300 Subject: [PATCH] TabContainer now reports proper minimum size, closes #4896 (cherry picked from commit 65bcde0a7d837bcfc98d37734806caa1f894a36d) --- scene/gui/tab_container.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 1c6a97bab8e..d14bb2d87b0 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -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 sb = get_stylebox("panel"); + ms+=sb->get_minimum_size(); + return ms; }