From 66ea0006e0a7ecc81061ff19b6410bb33d574dae Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 6 Jun 2023 11:49:05 +0300 Subject: [PATCH] Fix incorrect node placement in RTL layout when parent is non-Control canvas item. --- scene/gui/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index c28cfeea1d3..e34309df48c 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1712,7 +1712,7 @@ void Control::_size_changed() { } if (is_layout_rtl()) { - new_pos_cache.x = parent_rect.size.x - new_pos_cache.x - new_size_cache.x; + new_pos_cache.x = parent_rect.size.x + 2 * parent_rect.position.x - new_pos_cache.x - new_size_cache.x; } if (minimum_size.height > new_size_cache.height) {