From e78a2806eddd875869b92f9416c5d9a0b95ad331 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Sat, 24 Dec 2022 13:20:19 +0000 Subject: [PATCH] Resolved issue whereby the last row in a flow layout group would not size correctly. Resolves: https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/357 --- Runtime/Scripts/Layout/FlowLayoutGroup.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Scripts/Layout/FlowLayoutGroup.cs b/Runtime/Scripts/Layout/FlowLayoutGroup.cs index c5bad45..86eeb13 100644 --- a/Runtime/Scripts/Layout/FlowLayoutGroup.cs +++ b/Runtime/Scripts/Layout/FlowLayoutGroup.cs @@ -225,11 +225,11 @@ namespace UnityEngine.UI.Extensions if (startAxis == Axis.Horizontal) { float newOffset = CalculateRowVerticalOffset (groupHeight, offset, currentBarSpace); currentBarSize -= spacingBetweenElements; - LayoutRow (_itemList, currentBarSize, currentBarSpace, workingSize - (ChildForceExpandWidth ? 0 : spacingBetweenElements), padding.left, newOffset, axis); + LayoutRow (_itemList, currentBarSize, currentBarSpace, workingSize, padding.left, newOffset, axis); }else if (startAxis == Axis.Vertical) { float newOffset = CalculateColHorizontalOffset(groupWidth, offset, currentBarSpace); currentBarSize -= spacingBetweenElements; - LayoutCol(_itemList, currentBarSpace, currentBarSize, workingSize - (ChildForceExpandHeight ? 0 : spacingBetweenElements), newOffset, padding.top, axis); + LayoutCol(_itemList, currentBarSpace, currentBarSize, workingSize, newOffset, padding.top, axis); } }