File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -4107,13 +4107,18 @@ bool Tree::edit_selected(bool p_force_edit) {
41074107 // "floor()" centers vertically.
41084108 Vector2 ofs (0 , Math::floor ((MAX (line_editor->get_minimum_size ().height , rect.size .height - value_editor_height) - rect.size .height ) / 2 ));
41094109
4110- popup_rect.position = get_screen_position () + rect.position - ofs;
4111- popup_rect.size = rect.size ;
4112-
41134110 // Account for icon.
41144111 Size2 icon_size = _get_cell_icon_size (c) * popup_scale;
4115- popup_rect.position .x += icon_size.x ;
4116- popup_rect.size .x -= icon_size.x ;
4112+
4113+ popup_rect.size = rect.size ;
4114+ popup_rect.size .x -= icon_size.x + theme_cache.h_separation ;
4115+
4116+ popup_rect.position = rect.position - ofs;
4117+ popup_rect.position .x += icon_size.x + theme_cache.h_separation ;
4118+ if (cache.rtl ) {
4119+ popup_rect.position .x = get_size ().width - popup_rect.position .x - popup_rect.size .x ;
4120+ }
4121+ popup_rect.position += get_screen_position ();
41174122
41184123 line_editor->clear ();
41194124 line_editor->set_text (c.mode == TreeItem::CELL_MODE_STRING ? c.text : String::num (c.val , Math::range_step_decimals (c.step )));
You can’t perform that action at this time.
0 commit comments