From 89dc584103026fb4e5b014b68b16c2ab53769bc7 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Wed, 25 Mar 2026 15:46:39 -0300 Subject: [PATCH] Fix animation and key buttons of inspector sections being off-center in the RTL layout --- editor/inspector/editor_inspector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/inspector/editor_inspector.cpp b/editor/inspector/editor_inspector.cpp index 5188a1eaf0..8fdf44fbf6 100644 --- a/editor/inspector/editor_inspector.cpp +++ b/editor/inspector/editor_inspector.cpp @@ -2239,7 +2239,7 @@ void EditorInspectorSection::_notification(int p_what) { Ref key = theme_cache.icon_gui_animation_key; if (keying && key.is_valid()) { Point2 key_position; - key_position.x = (rtl ? margin_end : (get_size().width - key->get_width() - margin_end)) - theme_cache.padding_size / 2; + key_position.x = rtl ? margin_end + theme_cache.padding_size / 2 : (get_size().width - key->get_width() - margin_end - theme_cache.padding_size / 2); keying_rect = Rect2(key_position.x - theme_cache.padding_size / 2, 0, key->get_width() + theme_cache.padding_size, header_height); Color key_color(1, 1, 1); @@ -2299,7 +2299,7 @@ void EditorInspectorSection::_notification(int p_what) { const Ref &revert = theme_cache.icon_gui_revert; if (can_revert && revert.is_valid()) { Point2 revert_position; - revert_position.x = (rtl ? margin_end : (get_size().width - revert->get_width() - margin_end)) - theme_cache.padding_size / 2; + revert_position.x = rtl ? margin_end + theme_cache.padding_size / 2 : (get_size().width - revert->get_width() - margin_end - theme_cache.padding_size / 2); revert_rect = Rect2(revert_position.x - theme_cache.padding_size / 2, 0, revert->get_width() + theme_cache.padding_size, header_height); Color revert_color(1, 1, 1);