[NUI] Fix MatchParent to fill remaining space in LinearLayout
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 26 Apr 2021 07:00:19 +0000 (16:00 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Mon, 17 May 2021 11:25:46 +0000 (20:25 +0900)
commitbd10fe6c458f4ba6b21661490248f17fedd45187
treee211807dec285aa76500b565a6e5fb668c766abe
parent3cc4ce32b52122950d34e9c855f01a4d66fff655
[NUI] Fix MatchParent to fill remaining space in LinearLayout

Previously, in LinearLayout, LayoutParamPolicies.MatchParent sets child
size to its parent size.

Now, in LinearLayout, LayoutParamPolicies.MatchParent calculates the
remaining space of parent and fills child in the remaining space of
parent.

There are 2 cases to fill child in the remaining space of parent.
1. MatchParent (both with or without weight)
 - If child has MatchParent specification, then child is filled in the
   remaining space of parent.
2. Specification 0 with weight
 - If child has zero specification and weight is greater than 0, then
   child is filled in the remaining space of parent proportional to its
   weight.
src/Tizen.NUI/src/public/Layouting/LinearLayout.cs