-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 that popup_centered
didn't take the window's size into consideration
#72991
Fix that popup_centered
didn't take the window's size into consideration
#72991
Conversation
Thanks! |
This PR may reopen #55894. And why in that case, set the size first and then Perhaps the old size should be considered when calling |
You are correct, that this PR has reopened #55894 on Windows. #55894: don't take the previous size into consideration We would need to decide on which variant and adjust the according places, that use |
I don't see what the use case would be for not taking the size into account? This would mean popping up centered with an unknown size, then setting the size, and then it's no longer centered. |
Will popup at the smallest size when regardless of size. It is to consider the situation similar to #55894 to reuse the same popup window to display different content. #61982 and #62179 were created around the same time. |
this use-case could be handled by setting the size before the How about the following approach?
I have the impression, that With |
Well, I think the problem may be caused by |
I checked #62179. For the situation in #72949, the difference between before and after is mainly in Lines 1557 to 1563 in 929ee61
It is also a special case that godot/editor/plugins/visual_shader_editor_plugin.cpp Lines 4955 to 4957 in 929ee61
But if |
There is no meaningful change in this other than inconveniencing users. There are 2 behaviors observed by users: popup at a fixed size, and popup at the previous size. For the former, the size can be passed to the method directly, even if it will simply be a shortcut for Same is true for any other popup method that doesn't rely on a ratio instead. |
That is, the |
Yes, I think this makes the most sense. If you want the min size, you can pass it explicitly. Which is in fact what we normally do with these popups that are shared between different views. |
resolve #72949 (only tested it on linux)
alternative to #72954
regression from #62179