From: Jaehyun Cho Date: Tue, 10 Jun 2025 01:41:10 +0000 (+0900) Subject: [NUI] Fix ScrollableBase to propagate measuring with unlimited constraints X-Git-Tag: submit/tizen_9.0/20250612.150947~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=378e052355778018ab893109d24cc42b9347ab95;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix ScrollableBase to propagate measuring with unlimited constraints Up to now, ScrollableBase measures with Unspecified option and its limited constraints. e.g. Unspecified option with (1920, 1080) constraints This causes that its grand children are not measured with unlimited constraints. e.g. ScrollableBase - CustomLinearLayout - LinearLayout - TextLabel LinearLayout is measured with unlimited constraints. TextLabel is measured with limited constraints. To propagate measuring descendants with unlimited constraints, ScrollableBase is fixed to measure with AtMost option and unlimited constraints. e.g. AtMost option with int.MaxValue constraints --- diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index d7f18d49f..f59255db4 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -183,12 +183,12 @@ namespace Tizen.NUI.Components // or Width for horizontal scrolling if (scrollingDirection == Direction.Vertical) { - MeasureSpecification unrestrictedMeasureSpec = new MeasureSpecification(heightMeasureSpec.Size, MeasureSpecification.ModeType.Unspecified); + MeasureSpecification unrestrictedMeasureSpec = new MeasureSpecification(new LayoutLength(int.MaxValue), MeasureSpecification.ModeType.AtMost); MeasureChildWithMargins(childLayout, widthMeasureSpec, new LayoutLength(0), unrestrictedMeasureSpec, new LayoutLength(0)); // Height unrestricted by parent } else { - MeasureSpecification unrestrictedMeasureSpec = new MeasureSpecification(widthMeasureSpec.Size, MeasureSpecification.ModeType.Unspecified); + MeasureSpecification unrestrictedMeasureSpec = new MeasureSpecification(new LayoutLength(int.MaxValue), MeasureSpecification.ModeType.AtMost); MeasureChildWithMargins(childLayout, unrestrictedMeasureSpec, new LayoutLength(0), heightMeasureSpec, new LayoutLength(0)); // Width unrestricted by parent }