[NUI] Update recyclerView item and styles.add missing patches files.
authorEverLEEst(SangHyeon Jade Lee) <dltkdgus1764@gmail.com>
Mon, 29 Mar 2021 12:02:18 +0000 (21:02 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 1 Apr 2021 01:07:37 +0000 (10:07 +0900)
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultGridItem.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultLinearItem.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultTitleItem.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/RecyclerViewItem.Internal.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/RecyclerViewItem.cs
src/Tizen.NUI.Components/Theme/DefaultThemeCommon.cs

index 044e3da..3155bf7 100755 (executable)
@@ -43,7 +43,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public DefaultGridItem() : base()
         {
-            Initialize();
         }
 
         /// <summary>
@@ -53,7 +52,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public DefaultGridItem(string style) : base(style)
         {
-            Initialize();
         }
 
         /// <summary>
@@ -63,7 +61,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public DefaultGridItem(DefaultGridItemStyle itemStyle) : base(itemStyle)
         {
-            Initialize();
         }
 
         /// <summary>
@@ -437,10 +434,13 @@ namespace Tizen.NUI.Components
 
         }
 
-        /// <inheritdoc/>
+        /// <summary>
+        /// Initializes AT-SPI object.
+        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private void Initialize()
+        public override void OnInitialize()
         {
+            base.OnInitialize();
             Layout = new RelativeLayout();
             layoutChanged = true;
             LayoutDirectionChanged += OnLayoutDirectionChanged;
index ce3668b..d3627f6 100755 (executable)
@@ -44,7 +44,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public DefaultLinearItem() : base()
         {
-            Initialize();
         }
 
         /// <summary>
@@ -54,7 +53,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public DefaultLinearItem(string style) : base(style)
         {
-            Initialize();
         }
 
         /// <summary>
@@ -64,7 +62,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public DefaultLinearItem(DefaultLinearItemStyle itemStyle) : base(itemStyle)
         {
-            Initialize();
         }
 
         /// <summary>
@@ -272,7 +269,14 @@ namespace Tizen.NUI.Components
                 if (itemExtra != null)
                     itemExtra.ApplyStyle(defaultStyle.Extra);
                 if (itemSeperator != null)
+                {
                     itemSeperator.ApplyStyle(defaultStyle.Seperator);
+                    //FIXME : currently margin is not applied by ApplyStyle automatically.
+                    itemSeperator.Margin = defaultStyle.Seperator.Margin;
+                }
+                //FIXME : currently padding is not applied by ApplyStyle automatically.
+                Extents padding = defaultStyle.Padding;
+                Padding = padding;
             }
         }
 
@@ -323,18 +327,7 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected override void MeasureChild()
         {
-            var pad = Padding;
-            if (itemLabel)
-            {
-                var margin = itemLabel.Margin;
-                itemLabel.SizeWidth = SizeWidth - pad.Start - pad.End - margin.Start - margin.End;
-            }
-
-            if (itemSubLabel)
-            {
-                var margin = itemSubLabel.Margin;
-                itemSubLabel.SizeWidth = SizeWidth - pad.Start - pad.End - margin.Start - margin.End;
-            }
+            //Do Measure in here if necessary.
         }
 
         /// <inheritdoc/>
@@ -376,7 +369,7 @@ namespace Tizen.NUI.Components
 
             if (itemSubLabel != null)
             {
-                if (itemIcon)
+                if (itemIcon != null)
                 {
                     RelativeLayout.SetLeftTarget(itemSubLabel, itemIcon);
                     RelativeLayout.SetLeftRelativeOffset(itemSubLabel, 1.0F);
@@ -386,7 +379,7 @@ namespace Tizen.NUI.Components
                     RelativeLayout.SetLeftTarget(itemSubLabel, this);
                     RelativeLayout.SetLeftRelativeOffset(itemSubLabel, 0.0F);
                 }
-                if (itemExtra)
+                if (itemExtra != null)
                 {
                     RelativeLayout.SetRightTarget(itemSubLabel, itemExtra);
                     RelativeLayout.SetRightRelativeOffset(itemSubLabel, 0.0F);
@@ -407,7 +400,7 @@ namespace Tizen.NUI.Components
                 RelativeLayout.SetFillHorizontal(itemSubLabel, true);
             }
 
-            if (itemIcon)
+            if (itemIcon != null)
             {
                 RelativeLayout.SetLeftTarget(itemLabel, itemIcon);
                 RelativeLayout.SetLeftRelativeOffset(itemLabel, 1.0F);
@@ -417,7 +410,7 @@ namespace Tizen.NUI.Components
                 RelativeLayout.SetLeftTarget(itemLabel, this);
                 RelativeLayout.SetLeftRelativeOffset(itemLabel, 0.0F);
             }
-            if (itemExtra)
+            if (itemExtra != null)
             {
                 RelativeLayout.SetRightTarget(itemLabel, itemExtra);
                 RelativeLayout.SetRightRelativeOffset(itemLabel, 0.0F);
@@ -431,7 +424,7 @@ namespace Tizen.NUI.Components
             RelativeLayout.SetTopTarget(itemLabel, this);
             RelativeLayout.SetTopRelativeOffset(itemLabel, 0.0F);
 
-            if (itemSubLabel)
+            if (itemSubLabel != null)
             {
                 RelativeLayout.SetBottomTarget(itemLabel, itemSubLabel);
                 RelativeLayout.SetBottomRelativeOffset(itemLabel, 0.0F);
@@ -509,7 +502,11 @@ namespace Tizen.NUI.Components
             return new DefaultLinearItemStyle();
         }
 
-        private void Initialize()
+        /// <summary>
+        /// Initializes AT-SPI object.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public override void OnInitialize()
         {
             base.OnInitialize();
             Layout = new RelativeLayout();
index 0ab28da..fe77c68 100755 (executable)
@@ -42,7 +42,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public DefaultTitleItem() : base()
         {
-            Initialize();
         }
 
         /// <summary>
@@ -52,7 +51,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public DefaultTitleItem(string style) : base(style)
         {
-            Initialize();
         }
 
         /// <summary>
@@ -62,7 +60,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public DefaultTitleItem(DefaultTitleItemStyle itemStyle) : base(itemStyle)
         {
-            Initialize();
         }
 
         /// <summary>
@@ -196,7 +193,14 @@ namespace Tizen.NUI.Components
                 if (itemIcon != null)
                     itemIcon.ApplyStyle(defaultStyle.Icon);
                 if (itemSeperator != null)
+                {
                     itemSeperator.ApplyStyle(defaultStyle.Seperator);
+                    //FIXME : currently margin is not applied by ApplyStyle automatically.
+                    itemSeperator.Margin = defaultStyle.Seperator.Margin;
+                }
+                //FIXME : currently padding is not applied by ApplyStyle automatically.
+                Extents padding = defaultStyle.Padding;
+                Padding = padding;
             }
         }
 
@@ -247,12 +251,7 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected override void MeasureChild()
         {
-            if (itemLabel)
-            {
-                var pad = Padding;
-                var margin = itemLabel.Margin;
-                itemLabel.SizeWidth = SizeWidth - pad.Start - pad.End - margin.Start - margin.End;
-            }
+            // Do measure in here if necessary.
         }
 
         /// <inheritdoc/>
@@ -355,7 +354,11 @@ namespace Tizen.NUI.Components
             return new DefaultTitleItemStyle();
         }
 
-        private void Initialize()
+        /// <summary>
+        /// Initializes AT-SPI object.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public override void OnInitialize()
         {
             base.OnInitialize();
             Layout = new RelativeLayout();
index d35ad2e..e900020 100755 (executable)
@@ -247,11 +247,12 @@ namespace Tizen.NUI.Components
         }
 
         /// <summary>
-        /// It is hijack by using protected, style copy problem when class inherited from Button.
+        /// Initializes AT-SPI object.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private void Initialize()
+        public override void OnInitialize()
         {
+            base.OnInitialize();
             //FIXME!
             IsCreateByXaml = true;
             Layout = new AbsoluteLayout();
index 5e355a2..53c6265 100755 (executable)
@@ -104,7 +104,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public RecyclerViewItem() : base()
         {
-            Initialize();
         }
 
         /// <summary>
@@ -114,7 +113,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public RecyclerViewItem(string style) : base(style)
         {
-            Initialize();
         }
 
         /// <summary>
@@ -124,7 +122,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public RecyclerViewItem(RecyclerViewItemStyle itemStyle) : base(itemStyle)
         {
-            Initialize();
         }
 
         /// <summary>
index 1285dd7..721c0c8 100755 (executable)
@@ -260,37 +260,42 @@ namespace Tizen.NUI.Components
 
             theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultLinearItem", new DefaultLinearItemStyle()
             {
-                SizeHeight = 130,
-                Padding = new Extents(20, 20, 5, 5),
+                SizeHeight = 108,
+                Padding = new Extents(64, 64, 18, 17),
                 BackgroundColor = new Selector<Color>()
                 {
                     Normal = new Color(1, 1, 1, 1),
                     Pressed = new Color(0.85f, 0.85f, 0.85f, 1),
                     Disabled = new Color(0.70f, 0.70f, 0.70f, 1),
-                    Selected = new Color(0.701f, 0.898f, 0.937f, 1),
+                    Selected = new Color(0.85f, 0.85f, 0.85f, 1),
                 },
                 Label = new TextLabelStyle()
                 {
-                    PointSize = 10,
+                    PixelSize = 32,
                     Ellipsis = true,
+                    FontFamily = "BreezeSans", //FXIME Font Weight is Light
+                    TextColor = new Color("#001447FF"),
                 },
                 SubLabel = new TextLabelStyle()
                 {
-                    PointSize = 6,
+                    PixelSize = 28,
                     Ellipsis = true,
+                    FontFamily = "BreezeSans",
+                    TextColor = new Color("#001447FF"),
                 },
                 Icon = new ViewStyle()
                 {
-                    Margin = new Extents(0, 20, 0, 0)
+                    Margin = new Extents(0, 32, 0, 0)
                 },
                 Extra = new ViewStyle()
                 {
-                    Margin = new Extents(20, 0, 0, 0)
+                    Margin = new Extents(32, 0, 0, 0)
                 },
                 Seperator = new ViewStyle()
                 {
-                    Margin = new Extents(5, 5, 0, 0),
-                    BackgroundColor = new Color(0.78f, 0.78f, 0.78f, 1),
+                    SizeHeight = 1,
+                    Margin = new Extents(64, 64, 0, 0),
+                    BackgroundColor = new Color("#C3CAD2FF"),
                 },
             });
             theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultGridItem", new DefaultGridItemStyle()
@@ -298,8 +303,9 @@ namespace Tizen.NUI.Components
                 Padding = new Extents(5, 5, 5, 5),
                 Caption = new TextLabelStyle()
                 {
-                    PointSize = 9,
-                    Ellipsis = true,
+                    SizeHeight = 60,
+                    PixelSize = 24,
+                    LineWrapMode = LineWrapMode.Character,
                 },
                 Badge = new ViewStyle()
                 {
@@ -309,25 +315,26 @@ namespace Tizen.NUI.Components
 
             theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultTitleItem", new DefaultTitleItemStyle()
             {
-                SizeHeight = 90,
-                Padding = new Extents(10, 10, 5, 5),
+                SizeHeight = 60,
+                Padding = new Extents(64, 64, 12, 12),
                 BackgroundColor = new Selector<Color>()
                 {
-                    Normal = new Color(0.78f, 0.78f, 0.78f, 1),
+                    Normal = new Color("#EEEEF1FF"),
                 },
                 Label = new TextLabelStyle()
                 {
-                    PointSize = 10,
+                    PixelSize = 28,
                     Ellipsis = true,
+                    TextColor = new Color("#001447FF"),
                 },
                 Icon = new ViewStyle()
                 {
-                    Margin = new Extents(10, 0, 0, 0)
+                    Margin = new Extents(40, 0, 0, 0)
                 },
                 Seperator = new ViewStyle()
                 {
                     Margin = new Extents(0, 0, 0, 0),
-                    BackgroundColor = new Color(0.85f, 0.85f, 0.85f, 1),
+                    BackgroundColor = new Color(0, 0, 0, 0),
                 },
             });