From 1b7dd027a3823c46a982711626629e1d7031a09f Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Thu, 17 Apr 2025 17:44:44 +0900 Subject: [PATCH] [NUI] Fix ScrollableBase Layout to respect MaximumSize Previously, ScrollableBase Layout did not respect MaximumSize so the Size property value might be bigger than actual rendered size on screen if MaximumSize is smaller than Size property value. Because actual rendered size respects MaximumSize in DALi. Now, ScrollableBase Layout respects MaximumSize so the Size property value and actual rendered size on screen are the same. --- src/Tizen.NUI.Components/Controls/ScrollableBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index 179fd3c3f..a4329e0db 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -216,6 +216,10 @@ namespace Tizen.NUI.Components totalWidth = Math.Max(totalWidth, SuggestedMinimumWidth.AsDecimal()); totalHeight = Math.Max(totalHeight, SuggestedMinimumHeight.AsDecimal()); + // Since priority of MinimumSize is higher than MaximumSize in DALi, here follows it. + totalWidth = Math.Max(Math.Min(totalWidth, Owner.GetMaximumWidth()), Owner.GetMinimumWidth()); + totalHeight = Math.Max(Math.Min(totalHeight, Owner.GetMaximumHeight()), Owner.GetMinimumHeight()); + widthSizeAndState.State = childWidthState; heightSizeAndState.State = childHeightState; -- 2.34.1