1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00

Fix scale and position of popups with force_native.

This commit is contained in:
Pāvels Nadtočajevs
2025-06-15 17:18:03 +03:00
parent 46c495ca21
commit 34a97f9c9b
6 changed files with 25 additions and 1 deletions

View File

@@ -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()) {