We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PopupMenu
1 parent e4c9950 commit a99fdbdCopy full SHA for a99fdbd
scene/gui/menu_button.cpp
@@ -89,14 +89,11 @@ void MenuButton::show_popup() {
89
Size2i max_size;
90
if (scr_usable.has_area()) {
91
real_t max_h = scr_usable.get_end().y - rect.position.y;
92
- real_t max_w = scr_usable.get_end().x - rect.position.x;
93
- if (max_h >= 4 * rect.size.height && max_w >= rect.size.width) {
94
- max_size = Size2i(max_w, max_h);
+ if (max_h >= 4 * rect.size.height) {
+ max_size = Size2(RS::get_singleton()->get_maximum_viewport_size().width, max_h);
95
}
96
97
popup->set_max_size(max_size);
98
- rect.size.height = 0;
99
- popup->set_size(rect.size);
100
if (is_layout_rtl()) {
101
rect.position.x += rect.size.width - popup->get_size().width;
102
0 commit comments