Merge pull request #77691 from rsubtil/fix_popupmenu_auto_height

[3.x] Fix `PopupMenu`'s automatic max height
This commit is contained in:
Rémi Verschelde 2023-06-07 14:46:30 +02:00
commit b15f7c1319
No known key found for this signature in database
GPG Key ID: C3336907360768E1

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;
}