From 634e9460b9acc3bb9dfe5e8a74cb3297a4c8e8d2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 May 2020 03:06:42 +0530 Subject: Fix popup window size calculation in popup_centered_ratio by using Rect2 --- 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 b2fc17c0ab..a9be8a1eff 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -992,7 +992,7 @@ void Window::popup_centered_ratio(float p_ratio) { ERR_FAIL_COND(!is_inside_tree()); ERR_FAIL_COND_MSG(window_id == DisplayServer::MAIN_WINDOW_ID, "Can't popup the main window."); - Rect2i parent_rect; + Rect2 parent_rect; if (is_embedded()) { parent_rect = get_parent_viewport()->get_visible_rect(); -- cgit v1.2.3