[NUI] Fix to require Layout to fit to children or fill to parent
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Wed, 2 Jun 2021 12:29:39 +0000 (21:29 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 8 Jun 2021 05:35:32 +0000 (14:35 +0900)
commitaa7d78f9e6d21b30372888b45b5c722d5b27ba52
treedd5f1bc8cdfe274f448f866d9ecc8c06a405bc7b
parent2529437bd2f5a362df95199a2e9f3835b1439165
[NUI] Fix to require Layout to fit to children or fill to parent

This patch is necessary to the following patch.
"[NUI] Deprecate ResizePolicyType"

It is impossible that LayoutParamPolicies.WrapContent supports both
ResizePolicyType.UseNaturalSize and FitToChildren.

Therefore, LayoutParamPolicies.WrapContent does not support
ResizePolicyType.UseNaturalSize nor FitToChildren.
Instead, LayoutParamPolicies.WrapContent makes View fit to its children
only if the View sets its Layout.

In the same way, LayoutParamPolicies.MatchParent does not support
ResizePolicyType.FillToParent.
Instead, LayoutParamPolicies.MatchParent makes View fill to its parent
only if the View sets its Layout.

If View uses LayoutParamPolicies.WrapContent or MatchParent while it
does not set its Layout, then the View does not fit to its children nor
fill to its parent.
Instead, ResizePolicyType.UseNaturalSize is supported by default.
src/Tizen.NUI/src/public/BaseComponents/Style/ViewStyle.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/Common/NUIConstants.cs