[NUI] Fix to use SizeHeight instead of Size with width 0
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Wed, 1 Feb 2023 07:28:52 +0000 (16:28 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Thu, 9 Feb 2023 09:49:35 +0000 (18:49 +0900)
Previously, although users sets size with width 0, the width is updated
by dali's size calculation (e.g. text calculation) instead of width 0
set by user.

The following patch fixed the above bug.
8033b0ed4a31ebcd9449c2e0c98074247502c9be

By applying the above patch, some size assignment in theme should be
fixed to set size height instead of size with width 0.

src/Tizen.NUI.Components/Theme/DefaultThemeCommon.cs

index fcb72f2..a73f021 100755 (executable)
@@ -161,7 +161,7 @@ namespace Tizen.NUI.Components
                 },
                 Buttons = new ButtonStyle()
                 {
-                    Size = new Size(0, 80),
+                    SizeHeight = 80,
                     CornerRadius = 0,
                     BackgroundColor = new Selector<Color>()
                     {
@@ -603,7 +603,7 @@ namespace Tizen.NUI.Components
                     PixelSize = 24,
                     VerticalAlignment = VerticalAlignment.Center,
                     HorizontalAlignment = HorizontalAlignment.Center,
-                    Size = new Size(0, 44),
+                    SizeHeight = 44,
                     TextColor = new Selector<Color>()
                     {
                         Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
@@ -737,7 +737,7 @@ namespace Tizen.NUI.Components
                         PixelSize = 24,
                         VerticalAlignment = VerticalAlignment.Center,
                         HorizontalAlignment = HorizontalAlignment.Center,
-                        Size = new Size(0, 44),
+                        SizeHeight = 44,
                         TextColor = new Selector<Color>()
                         {
                             Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
@@ -762,7 +762,7 @@ namespace Tizen.NUI.Components
                         PixelSize = 24,
                         VerticalAlignment = VerticalAlignment.Center,
                         HorizontalAlignment = HorizontalAlignment.Center,
-                        Size = new Size(0, 44),
+                        SizeHeight = 44,
                         TextColor = new Selector<Color>()
                         {
                             Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),