Merge pull request #4191 from leezh/progressbar_minsize

Progress bar minsize now checks percent_visible
This commit is contained in:
Rémi Verschelde 2016-04-04 07:31:03 +02:00
commit 72825ecdca
1 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,9 @@ Size2 ProgressBar::get_minimum_size() const {
Ref<Font> font = get_font("font");
Size2 ms=bg->get_minimum_size()+bg->get_center_size();
ms.height=MAX(ms.height,bg->get_minimum_size().height+font->get_height());
if (percent_visible) {
ms.height=MAX(ms.height,bg->get_minimum_size().height+font->get_height());
}
return ms;
}