[NUI] Add default DropdownItemStyle (#1638)
authorzhouleonlei <56956725+zhouleonlei@users.noreply.github.com>
Fri, 29 May 2020 05:44:59 +0000 (13:44 +0800)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 05:44:59 +0000 (13:44 +0800)
src/Tizen.NUI.Components/Controls/DropDown.cs
src/Tizen.NUI.Components/PreloadStyle/DefaultTheme.cs [changed mode: 0644->0755]
src/Tizen.NUI.Components/Style/Theme.cs [changed mode: 0644->0755]

index 20a65738853897280aa9b55d1cd72e39befa65c7..02768e62f6529de426a67db3f049f7d6874e7376 100755 (executable)
@@ -1426,7 +1426,7 @@ namespace Tizen.NUI.Components
             [EditorBrowsable(EditorBrowsableState.Never)]
             protected override ViewStyle GetViewStyle()
             {
-                return null;
+                return new DropDownItemStyle();
             }
 
             private void CreateIcon()
old mode 100644 (file)
new mode 100755 (executable)
index 5e2a1a7..973545b
@@ -151,6 +151,26 @@ namespace Tizen.NUI.Components
             };
         }
 
+        protected override DropDownItemStyle GetDropDownItemStyle()
+        {
+            return new DropDownItemStyle
+            {
+                Size = new Size(360, 50),
+                BackgroundColor = new Selector<Color>
+                {
+                    Pressed = new Color(0.05f, 0.63f, 0.9f, 1),
+                    Selected = new Color(0.8f, 0.8f, 0.8f, 1),
+                    Normal = new Color(1, 1, 1, 1),
+                },
+                Text = new TextLabelStyle
+                {
+                    PointSize = StyleManager.PointSizeNormal,
+                    Position = new Position(28, 0),
+                    Text = "List item",
+                },
+            };
+        }
+
         protected override PopupStyle GetPopupStyle()
         {
             return new PopupStyle
old mode 100644 (file)
new mode 100755 (executable)
index 0cb7494..37765db
@@ -35,6 +35,7 @@ namespace Tizen.NUI.Components
             styleMap.Add(typeof(Button), GetButtonStyle);
             styleMap.Add(typeof(CheckBox), GetCheckBoxStyle);
             styleMap.Add(typeof(DropDown), GetDropDownStyle);
+            styleMap.Add(typeof(DropDown.DropDownDataItem), GetDropDownItemStyle);
             styleMap.Add(typeof(Popup), GetPopupStyle);
             styleMap.Add(typeof(Progress), GetProgressStyle);
             styleMap.Add(typeof(RadioButton), GetRadioButtonStyle);
@@ -63,6 +64,8 @@ namespace Tizen.NUI.Components
 
         protected abstract DropDownStyle GetDropDownStyle();
 
+        protected abstract DropDownItemStyle GetDropDownItemStyle();
+
         protected abstract PopupStyle GetPopupStyle();
 
         protected abstract ProgressStyle GetProgressStyle();