Skip to content

Commit

Permalink
Merge pull request #77691 from rsubtil/fix_popupmenu_auto_height
Browse files Browse the repository at this point in the history
[3.x] Fix `PopupMenu`'s automatic max height
  • Loading branch information
akien-mga committed Jun 7, 2023
2 parents 450902a + 7fdfed2 commit b15f7c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scene/gui/popup_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b15f7c1

Please sign in to comment.