Fix PopupMenu's maximum height not being automatically set

This commit is contained in:
Ricardo Subtil 2023-05-31 10:53:09 +01:00 committed by Relintai
parent 147640412a
commit 3191832c37

View File

@ -124,6 +124,8 @@ Size2 PopupMenu::get_minimum_size() const {
minsize.width += check_w; minsize.width += check_w;
} }
minsize.height = MIN(minsize.height, OS::get_singleton()->get_window_size().height);
if (max_height > 0 && minsize.height > max_height) { if (max_height > 0 && minsize.height > max_height) {
minsize.height = max_height; minsize.height = max_height;
} }