Godot Engine – Multi-platform 2D and 3D game engine
Fix ItemList margins including scrollbar width when it's hidden
BrotherShort58ad07a573f9
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cppindex ee0e63acb12..ae5ff236d70 100644--- a/scene/gui/item_list.cpp+++ b/scene/gui/item_list.cpp@@ -2044,7 +2044,7 @@ int ItemList::_get_available_item_width() const {}}} else {- width -= MAX(theme_cache.panel_style->get_margin(SIDE_RIGHT), theme_cache.scrollbar_margin_right);+ width -= MAX(0, theme_cache.scrollbar_margin_right - theme_cache.panel_style->get_margin(SIDE_RIGHT));}return width;