Skip to content

Commit

Permalink
Merge pull request #72991 from Sauermann/fix-popup-window-minsize
Browse files Browse the repository at this point in the history
Fix that `popup_centered` didn't take the window's size into consideration
  • Loading branch information
akien-mga committed Feb 9, 2023
2 parents 91409fe + 88f4e5c commit 1a5f28d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1a5f28d

Please sign in to comment.