Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix popup window size calculation in popup_centered_ratio by using Rect2 #38793

Merged

Conversation

Anutrix
Copy link
Contributor

@Anutrix Anutrix commented May 16, 2020

This is to prevent

popup_rect.size = parent_rect.size * p_ratio;
from turning 0,0.
Seems like a typo from 197cb4e.
Affects and fixes parts of issues like Issue1 of #37401, fixes #38726.
Completely fixes Quick Open dialogs, Orphan Resource Explorer and lots of other stuff that use popup_centered_ratio().

Note: This PR only does not fix file_dialog when the Project Manager is the main window(but that's a different issue caused by wrong parent window size being reported).

@akien-mga akien-mga added this to the 4.0 milestone May 17, 2020
@akien-mga akien-mga merged commit 72608e5 into godotengine:master May 17, 2020
@akien-mga
Copy link
Member

Thanks!

@Anutrix Anutrix deleted the window-popup-centered-rect2-fix branch May 18, 2020 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some dialogue window open too small
2 participants