You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The size of the popup menu is not set. set_as_minsize() worked because it called set_size(get_contents_minimum_size());, so then the popup size would be set correctly before the adjust_popup_rect method was called. But now, this code is being called before it is drawn (and it's size is not set manually), so the size is unknown.
I have investigated further and the flow of logic is pretty weird...
PopupMenu::popup()
Window::popup()
In Window::popup(), calls Popup::_popup_adjust_rect(), which in this case does nothing because it still thinks the popup is tiny.
In Window::popup(), calls set_size(adjust.size)
set_size() calls _update_window_size, which enforces size limits.
Then finally the size limit is get_contents_minimum_size(), and the size is set to the maximum of the contents size, the min_size and the current size.
So this is weird because set_size is called with a size of [36, 12], but after that method returns, the size is then [310, 428] (or whatever the size should be)
This is a really weird way of doing it imo. To fix this, I just call _update_window_size() in Window::popup() before doing the _popup_adjust_rect(), so that the size is correctly calculated before adjusting.
Godot version:
011d201
OS/device including version:
Windows 10
Issue description:
nuff said
The text was updated successfully, but these errors were encountered: