[NUI] Fix Picker's HeightSpecification
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 9 Feb 2023 07:12:49 +0000 (16:12 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Mon, 13 Feb 2023 09:16:02 +0000 (18:16 +0900)
Previously, HeightSpecifications of Picker, DatePicker, TimePicker are
MatchParent.
So the Pickers' SizeHeights are calculated based on their parent's
SizeHeight.
This causes the recursive size calculation problem if Picker's parent
has WrapContent HeightSpecification. (e.g. Dialog)

Now, the Pickers' SizeHeights are set in DefaultThemeCommon as follows.
Picker's SizeHeight is set in DefaultThemeCommon.
DatePicker's Pickers SizeHeights are set in DefaultThemeCommon.
TimePicker's Pickers SizeHeights are set in DefaultThemeCommon.

Therefore, Picker does not need to have MatchParent HeightSpecification.

src/Tizen.NUI.Components/Controls/DatePicker.cs
src/Tizen.NUI.Components/Controls/Picker.cs
src/Tizen.NUI.Components/Controls/TimePicker.cs

index a113da2..3135e24 100755 (executable)
@@ -287,8 +287,6 @@ namespace Tizen.NUI.Components
 
         private void Initialize()
         {
-            HeightSpecification = LayoutParamPolicies.MatchParent;
-
             Layout = new LinearLayout()
             {
                 LinearOrientation = LinearLayout.Orientation.Horizontal,
index de307e0..5d33969 100755 (executable)
@@ -402,8 +402,6 @@ namespace Tizen.NUI.Components
 
         private void Initialize()
         {
-            HeightSpecification = LayoutParamPolicies.MatchParent;
-
             //Picker Using scroller internally. actually it is a kind of scroller which has infinity loop,
             //and item center align features.
             pickerScroller = new PickerScroller()
index fc76232..ffa7deb 100755 (executable)
@@ -393,8 +393,6 @@ namespace Tizen.NUI.Components
                          Justification = "The CellPadding will be dispose when the time picker disposed")]
         private void Initialize()
         {
-            HeightSpecification = LayoutParamPolicies.MatchParent;
-
             Layout = new LinearLayout()
             {
                 LinearOrientation = LinearLayout.Orientation.Horizontal,