mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix scale and position of popups with force_native.
This commit is contained in:
parent
46c495ca21
commit
34a97f9c9b
6 changed files with 25 additions and 1 deletions
|
|
@ -81,6 +81,10 @@ void MenuButton::show_popup() {
|
|||
emit_signal(SNAME("about_to_popup"));
|
||||
Rect2 rect = get_screen_rect();
|
||||
rect.position.y += rect.size.height;
|
||||
if (get_viewport()->is_embedding_subwindows() && popup->get_force_native()) {
|
||||
Transform2D xform = get_viewport()->get_popup_base_transform_native();
|
||||
rect = xform.xform(rect);
|
||||
}
|
||||
rect.size.height = 0;
|
||||
popup->set_size(rect.size);
|
||||
if (is_layout_rtl()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue