From 872e4da330e70c34096191f35363465717a3ee23 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Wed, 7 Jan 2026 21:10:53 -0300 Subject: [PATCH] Fix incorrect position of icons in `ItemList` when on top mode --- scene/gui/item_list.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index ba114225a2..fe14b199b0 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1550,11 +1550,10 @@ void ItemList::_notification(int p_what) { if (icon_mode == ICON_MODE_TOP) { pos.x += Math::floor((items[i].rect_cache.size.width - icon_size.width) / 2); - pos.y += theme_cache.icon_margin; text_ofs.y = icon_size.height + theme_cache.icon_margin * 2; } else { pos.y += Math::floor((items[i].rect_cache.size.height - icon_size.height) / 2); - text_ofs.x = icon_size.width + theme_cache.icon_margin; + text_ofs.x = icon_size.width + theme_cache.icon_margin * 2; } Rect2 draw_rect = Rect2(pos, icon_size);