diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp index fc0e7be34f8..02da8ff27e5 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 = 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; }