summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-09 23:42:42 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-09 23:42:42 +0100
commit1a5f28df20523e31854217138a46f188b6e4f668 (patch)
tree6fc55537a64d64270988693acdba87d8e5cc44d0 /scene
parent91409fe0c8020dcfdb3380c2e01643a55194aa70 (diff)
parent88f4e5cc942a2f1d96213e01b402ec871295957d (diff)
Merge pull request #72991 from Sauermann/fix-popup-window-minsize
Fix that `popup_centered` didn't take the window's size into consideration
Diffstat (limited to 'scene')
-rw-r--r--scene/main/window.cpp2
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;