You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Merge pull request #45201 from EricEzaM/PR/popup-menu-fix
Fixed popup not calculating size correctly before adjusting its rect.
This commit is contained in:
@@ -1035,6 +1035,9 @@ void Window::popup_centered_ratio(float p_ratio) {
|
|||||||
void Window::popup(const Rect2i &p_screen_rect) {
|
void Window::popup(const Rect2i &p_screen_rect) {
|
||||||
emit_signal("about_to_popup");
|
emit_signal("about_to_popup");
|
||||||
|
|
||||||
|
// Update window size to calculate the actual window size based on contents minimum size and minimum size.
|
||||||
|
_update_window_size();
|
||||||
|
|
||||||
if (p_screen_rect != Rect2i()) {
|
if (p_screen_rect != Rect2i()) {
|
||||||
set_position(p_screen_rect.position);
|
set_position(p_screen_rect.position);
|
||||||
set_size(p_screen_rect.size);
|
set_size(p_screen_rect.size);
|
||||||
|
|||||||
Reference in New Issue
Block a user