1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +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

@@ -3216,7 +3216,7 @@ void PopupMenu::popup(const Rect2i &p_bounds) {
}
void PopupMenu::_pre_popup() {
Size2 scale = get_parent_viewport()->get_popup_base_transform().get_scale();
Size2 scale = get_force_native() ? get_parent_viewport()->get_popup_base_transform_native().get_scale() : get_parent_viewport()->get_popup_base_transform().get_scale();
CanvasItem *c = Object::cast_to<CanvasItem>(get_parent());
if (c) {
scale *= c->get_global_transform_with_canvas().get_scale();