summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-10-14 14:09:53 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-10-14 14:09:53 -0500
commita7b4e67c79f4aef923c946f5f16b7970060d6b58 (patch)
treee3ed634df507a0c71d32010c0c80027286022ba3
parentc409546cc3d6fdaa53bbad94594680d5144d82ac (diff)
parent3a9f47054334cdbb466a5a4ef5859e4632bb9a23 (diff)
downloadredot-engine-a7b4e67c79f4aef923c946f5f16b7970060d6b58.tar.gz
Merge pull request #97996 from timothyqiu/rtl-arrow
Fix `ControlEditorPopupButton` arrow position in RTL language
-rw-r--r--editor/plugins/control_editor_plugin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp
index 5c5f236ff3..cd13deb3e9 100644
--- a/editor/plugins/control_editor_plugin.cpp
+++ b/editor/plugins/control_editor_plugin.cpp
@@ -31,7 +31,6 @@
#include "control_editor_plugin.h"
#include "editor/editor_node.h"
-#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
@@ -511,6 +510,9 @@ void ControlEditorPopupButton::_notification(int p_what) {
case NOTIFICATION_DRAW: {
if (arrow_icon.is_valid()) {
Vector2 arrow_pos = Point2(26, 0) * EDSCALE;
+ if (is_layout_rtl()) {
+ arrow_pos.x = get_size().x - arrow_pos.x - arrow_icon->get_width();
+ }
arrow_pos.y = get_size().y / 2 - arrow_icon->get_height() / 2;
draw_texture(arrow_icon, arrow_pos);
}