From 88f4e5cc942a2f1d96213e01b402ec871295957d Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Thu, 9 Feb 2023 22:05:39 +0100 Subject: [PATCH] Fix that `popup_centered` didn't take the window's size into consideration --- scene/main/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 44df6485521..771e074d48b 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -1462,7 +1462,7 @@ void Window::popup_centered(const Size2i &p_minsize) { } Rect2i popup_rect; - popup_rect.size = _clamp_window_size(p_minsize); + popup_rect.size = _clamp_window_size(get_size().max(p_minsize)); if (parent_rect != Rect2()) { popup_rect.position = parent_rect.position + (parent_rect.size - popup_rect.size) / 2;