Fix PopupMenu's maximum height not being automatically set

This commit is contained in:
Ricardo Subtil 2023-05-31 10:53:09 +01:00
parent b71701714f
commit 7fdfed2a9e

View file

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