summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-04-04 07:31:03 +0200
committerRémi Verschelde <remi@verschelde.fr>2016-04-04 07:31:03 +0200
commit72825ecdca3ea91a2f552fb84416f9bc4d42b182 (patch)
tree5afb08b4683b8202b9f15ea63d940d47b7f086de
parente971112f4abc8a89089f4cb500863867a4e88ec6 (diff)
parent0bba09c4cb98525ccc88aa69574162458a79abb6 (diff)
Merge pull request #4191 from leezh/progressbar_minsize
Progress bar minsize now checks percent_visible
-rw-r--r--scene/gui/progress_bar.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp
index fc0e7be34f..02da8ff27e 100644
--- a/scene/gui/progress_bar.cpp
+++ b/scene/gui/progress_bar.cpp
@@ -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;
}