diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-02-09 22:05:39 +0100 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-02-09 22:05:39 +0100 |
commit | 88f4e5cc942a2f1d96213e01b402ec871295957d (patch) | |
tree | 280097937d08b03d263b61a90d350726aa0468c1 /scene/main | |
parent | 5c1295dc20323ee1596369b5bcf91ba6a9383336 (diff) |
Fix that `popup_centered` didn't take the window's size into consideration
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/window.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 44df648552..771e074d48 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; |