1
0
Fork 0

Fix tree item editable area missing icon max width bug

This commit is contained in:
BrotherShort 2025-11-07 00:27:08 +08:00
parent cb3af5afff
commit db06af0485
1 changed files with 1 additions and 6 deletions

View File

@ -4048,12 +4048,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
int icon_size_x = 0;
Ref<Texture2D> icon = get_selected()->get_icon(selected_col);
if (icon.is_valid()) {
Rect2i icon_region = get_selected()->get_icon_region(selected_col);
if (icon_region == Rect2i()) {
icon_size_x = icon->get_width();
} else {
icon_size_x = icon_region.size.width;
}
icon_size_x = _get_cell_icon_size(get_selected()->cells[selected_col]).x;
}
// Icon is treated as if it is outside of the rect so that double clicking on it will emit the `item_icon_double_clicked` signal.
if (rtl) {