From 7fdfed2a9efad37ff493735352ec3370d8bb433c Mon Sep 17 00:00:00 2001 From: Ricardo Subtil Date: Wed, 31 May 2023 10:53:09 +0100 Subject: [PATCH] Fix PopupMenu's maximum height not being automatically set --- scene/gui/popup_menu.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 4662e5edf0f..6c37752056b 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -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; }