Progress bar minsize now checks percent_visible
Allows for really thin progress bars such as for pixel-art styles.
(cherry picked from commit 0bba09c4cb
)
This commit is contained in:
parent
f06f574735
commit
5b1aa3a5cd
|
@ -35,7 +35,9 @@ Size2 ProgressBar::get_minimum_size() const {
|
||||||
Ref<Font> font = get_font("font");
|
Ref<Font> font = get_font("font");
|
||||||
|
|
||||||
Size2 ms=bg->get_minimum_size()+bg->get_center_size();
|
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;
|
return ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue