[NUI] Fix AppBar Content's Layout properties
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Wed, 14 Jul 2021 13:49:04 +0000 (22:49 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 19 Jul 2021 09:01:03 +0000 (18:01 +0900)
Since LinearLayout's size calculation logic has been fixed, AppBar Content's
Layout properties are fixed to calculate size correctly.

After fixing LinearLayout's size calculation logic, Weight is valid only if
Width/HeightSpecification is MatchParent.

AppBarStyle's ActionView and ActionButton's default size is fixed to show its
own size.

src/Tizen.NUI.Components/Controls/Navigation/AppBar.cs
src/Tizen.NUI.Components/Theme/DefaultThemeCommon.cs

index 3bb879d..3439a90 100755 (executable)
@@ -609,7 +609,6 @@ namespace Tizen.NUI.Components
             return new TextLabel()
             {
                 HeightSpecification = LayoutParamPolicies.MatchParent,
-                Weight = 1.0f,
             };
         }
 
@@ -620,8 +619,10 @@ namespace Tizen.NUI.Components
                 Layout = new LinearLayout()
                 {
                     LinearOrientation = LinearLayout.Orientation.Horizontal,
+                    LinearAlignment = LinearLayout.Alignment.End,
                 },
-                Weight = 0.0f,
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification = LayoutParamPolicies.MatchParent,
             };
         }
 
index 9db1ac2..9f0ec4c 100755 (executable)
@@ -449,13 +449,13 @@ namespace Tizen.NUI.Components
                 },
                 ActionView = new ViewStyle()
                 {
-                    Size = new Size(-1, 120),
+                    Size = new Size(48, 120),
                     CornerRadius = 0,
                     BackgroundColor = new Color(0, 0, 0, 0),
                 },
                 ActionButton = new ButtonStyle()
                 {
-                    Size = new Size(-1, 120),
+                    Size = new Size(-2, 120),
                     CornerRadius = 0,
                     BackgroundColor = new Color(0, 0, 0, 0),
                     Text = new TextLabelStyle()
@@ -471,7 +471,7 @@ namespace Tizen.NUI.Components
                     },
                     Icon = new ImageViewStyle()
                     {
-                        Size = new Size(-1, 48),
+                        Size = new Size(48, 48),
                         Color = new Selector<Color>()
                         {
                             Normal = new Color("#0A0E4A"),