[NUI] Fix TextLabel Theme to set FontSizeScale with UseSystemSetting
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Theme / DefaultThemeCommon.cs
index 735a75a..f587dce 100755 (executable)
@@ -39,7 +39,8 @@ namespace Tizen.NUI.Components
             // Button base style
             theme.AddStyleWithoutClone("Tizen.NUI.Components.Button", new ButtonStyle()
             {
-                Size = new Size(252, 48),
+                MinimumSize = new Size(252, 48),
+                Padding = new Extents(32, 32, 8, 8),
                 ItemSpacing = new Size2D(8, 8),
                 CornerRadius = 12.0f,
                 ItemHorizontalAlignment = HorizontalAlignment.Center,
@@ -56,6 +57,64 @@ namespace Tizen.NUI.Components
                 {
                     TextColor = new Color("#FDFDFD"),
                     PixelSize = 24,
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
+                }
+            });
+
+            // Outlined Button style
+            theme.AddStyleWithoutClone("Tizen.NUI.Components.Button.Outlined", new ButtonStyle()
+            {
+                MinimumSize = new Size(252, 48),
+                Padding = new Extents(32, 32, 8, 8),
+                ItemSpacing = new Size2D(8, 8),
+                CornerRadius = 12.0f,
+                BorderlineWidth = 2.0f,
+                BorderlineColorSelector = new Selector<Color>()
+                {
+                    Normal = new Color("#FF6200"),
+                    Pressed = new Color("#FFA166"),
+                    Focused = new Color("#FF7119"),
+                    Selected = new Color("#FF8133"),
+                    Disabled = new Color("#CACACA"),
+                },
+                ItemHorizontalAlignment = HorizontalAlignment.Center,
+                ItemVerticalAlignment = VerticalAlignment.Center,
+                BackgroundColor = Color.Transparent,
+                Text = new TextLabelStyle()
+                {
+                    TextColor = new Selector<Color>()
+                    {
+                        Normal = new Color("#FF6200"),
+                        Pressed = new Color("#FFA166"),
+                        Focused = new Color("#FF7119"),
+                        Selected = new Color("#FF8133"),
+                        Disabled = new Color("#CACACA"),
+                    },
+                    PixelSize = 24,
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
+                }
+            });
+
+            // TextOnly Button style
+            theme.AddStyleWithoutClone("Tizen.NUI.Components.Button.TextOnly", new ButtonStyle()
+            {
+                MinimumSize = new Size(120, 48),
+                Padding = new Extents(32, 32, 8, 8),
+                ItemHorizontalAlignment = HorizontalAlignment.Center,
+                ItemVerticalAlignment = VerticalAlignment.Center,
+                BackgroundColor = Color.Transparent,
+                Text = new TextLabelStyle()
+                {
+                    TextColor = new Selector<Color>()
+                    {
+                        Normal = new Color("#FF6200"),
+                        Pressed = new Color("#FFA166"),
+                        Focused = new Color("#FF7119"),
+                        Selected = new Color("#FF8133"),
+                        Disabled = new Color("#CACACA"),
+                    },
+                    PixelSize = 24,
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                 }
             });
 
@@ -85,6 +144,7 @@ namespace Tizen.NUI.Components
                 {
                     TextColor = new Color("#090E21"),
                     PixelSize = 24,
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                 }
             });
 
@@ -103,10 +163,11 @@ namespace Tizen.NUI.Components
                 {
                     PointSize = 16,
                     Padding = new Extents(20, 20, 20, 20),
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                 },
                 Buttons = new ButtonStyle()
                 {
-                    Size = new Size(0, 80),
+                    SizeHeight = 80,
                     CornerRadius = 0,
                     BackgroundColor = new Selector<Color>()
                     {
@@ -124,6 +185,7 @@ namespace Tizen.NUI.Components
                     Text = new TextLabelStyle()
                     {
                         TextColor = new Color(0.05f, 0.63f, 0.9f, 1),
+                        FontSizeScale = FontSizeScale.UseSystemSetting,
                     }
                 }
             });
@@ -180,6 +242,7 @@ namespace Tizen.NUI.Components
                 {
                     TextColor = new Color("#090E21"),
                     PixelSize = 24,
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                 }
             });
 
@@ -221,11 +284,19 @@ namespace Tizen.NUI.Components
                 },
                 ValueIndicatorImage = new ImageViewStyle()
                 {
-                    Size = new Size(16, 24),
-                    BorderlineWidth = 0.5f,
+                    Size = new Size(43, 40),
+                    BorderlineWidth = 1.0f,
                     BorderlineColor = new Color("#FF6200"),
-                    BackgroundColor = new Color(0.0f, 0.04f, 0.16f, 1.0f),
+                    BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.0f),
+                    CornerRadius = 12.0f,
                 },
+                ValueIndicatorText = new TextLabelStyle()
+                {
+                    SizeHeight = 24,
+                    PixelSize = 16,
+                    TextColor = new Color("#FF6200"),
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
+                }
             });
 
             // Switch base style
@@ -265,6 +336,7 @@ namespace Tizen.NUI.Components
                 {
                     TextColor = new Color("#090E21"),
                     PixelSize = 24,
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                 }
             });
 
@@ -277,12 +349,14 @@ namespace Tizen.NUI.Components
             // Pagination base style
             theme.AddStyleWithoutClone("Tizen.NUI.Components.Pagination", new PaginationStyle()
             {
+                Size = new Size(450, 24),
                 IndicatorImageUrl = new Selector<string>()
                 {
                     Normal = FrameworkInformation.ResourcePath + "nui_component_default_pagination_normal_dot.png",
                     Selected = FrameworkInformation.ResourcePath + "nui_component_default_pagination_focus_dot.png",
                 },
-                IndicatorSize = new Size(10, 10),
+                IndicatorSize = new Size(64, 8),
+                IndicatorSpacing = 16,
             });
 
             // Scrollbar base style
@@ -351,6 +425,7 @@ namespace Tizen.NUI.Components
                         Disabled = new Color("#CACACA"),
                         Selected = new Color("#FF6200"),
                     },
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                     ThemeChangeSensitive = false
                 },
                 SubLabel = new TextLabelStyle()
@@ -365,6 +440,7 @@ namespace Tizen.NUI.Components
                         Disabled = new Color("#CACACA"),
                         Selected = new Color("#FF6200"),
                     },
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                     ThemeChangeSensitive = false
                 },
                 Icon = new ViewStyle()
@@ -410,6 +486,7 @@ namespace Tizen.NUI.Components
                         Disabled = new Color("#CACACA"),
                         Selected = new Color("#FF6200"),
                     },
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                     ThemeChangeSensitive = false
                 },
                 Badge = new ViewStyle()
@@ -432,6 +509,7 @@ namespace Tizen.NUI.Components
                     Ellipsis = true,
                     FontFamily = "SamsungOneUI400",
                     TextColor = new Color("#090E217F"),
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                     ThemeChangeSensitive = false
                 },
                 Icon = new ViewStyle()
@@ -486,6 +564,7 @@ namespace Tizen.NUI.Components
                     {
                         Normal = new Color("#17234D"),
                     },
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                     ThemeChangeSensitive = false
                 },
                 ActionView = new ViewStyle()
@@ -509,6 +588,7 @@ namespace Tizen.NUI.Components
                             Pressed = new Color("#D95300"),
                             Disabled = new Color("#CACACA"),
                         },
+                        FontSizeScale = FontSizeScale.UseSystemSetting,
                     },
                     Icon = new ImageViewStyle()
                     {
@@ -532,28 +612,22 @@ namespace Tizen.NUI.Components
             // Picker base style
             theme.AddStyleWithoutClone("Tizen.NUI.Components.Picker", new PickerStyle()
             {
-                Size = new Size(160, 339),
+                SizeHeight = 220.0f,
+                MinimumSize = new Size(80, -1),
                 ItemTextLabel = new TextLabelStyle()
                 {
-                    //FIXME: Should be check PointSize. given size from UX is too large.
-                    PixelSize = 32,
+                    PixelSize = 24,
                     VerticalAlignment = VerticalAlignment.Center,
                     HorizontalAlignment = HorizontalAlignment.Center,
-                    Size = new Size(0,72),
+                    SizeHeight = 44,
                     TextColor = new Selector<Color>()
                     {
-                        Normal = new Color("#000C2B"),
+                        Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
                     },
-                    BackgroundColor = Color.White,
-                },
-                Divider = new ViewStyle()
-                {
-                    SizeHeight = 2.0f,
-                    WidthResizePolicy = ResizePolicyType.FillToParent,
-                    Position = new Position(0, 132),
-                    BackgroundColor = new Color("#0A0E4A"),
+                    BackgroundColor = new Color("#FAFAFA"),
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                 },
-                StartScrollOffset = new Size(0, 12),
+                StartScrollOffset = new Size(0, 0),
             });
 
             // TabBar base style
@@ -600,6 +674,7 @@ namespace Tizen.NUI.Components
                         Focused = new Color("#FF6200"),
                         Disabled = new Color("#CACACA"),
                     },
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                     ThemeChangeSensitive = false,
                 },
                 Icon = new ImageViewStyle()
@@ -631,6 +706,7 @@ namespace Tizen.NUI.Components
                 VerticalAlignment = VerticalAlignment.Center,
                 Padding = new Extents(16, 16, 16, 16),
                 PositionY = 120,
+                FontSizeScale = FontSizeScale.UseSystemSetting,
             });
 
             // AlertDialog base style
@@ -649,6 +725,7 @@ namespace Tizen.NUI.Components
                     HorizontalAlignment = HorizontalAlignment.Center,
                     VerticalAlignment = VerticalAlignment.Center,
                     TextColor = new Color("#090E21"),
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                     ThemeChangeSensitive = false,
                 },
                 MessageTextLabel = new TextLabelStyle()
@@ -659,6 +736,7 @@ namespace Tizen.NUI.Components
                     HorizontalAlignment = HorizontalAlignment.Center,
                     VerticalAlignment = VerticalAlignment.Center,
                     TextColor = new Color("#090E21"),
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                     ThemeChangeSensitive = false,
                 },
                 ActionContent = new ViewStyle()
@@ -670,66 +748,59 @@ namespace Tizen.NUI.Components
             // TimePicker base style
             theme.AddStyleWithoutClone("Tizen.NUI.Components.TimePicker", new TimePickerStyle()
             {
-                CellPadding = new Size(50, 339),
+                CellPadding = new Size(12, 220),
 
                 Pickers = new PickerStyle()
                 {
-                    Size = new Size(160, 339),
+                    Size = new Size(80, 220),
                     ItemTextLabel = new TextLabelStyle()
                     {
-                        //FIXME: Should be check PointSize. given size from UX is too large.
-                        PixelSize = 32,
+                        PixelSize = 24,
                         VerticalAlignment = VerticalAlignment.Center,
                         HorizontalAlignment = HorizontalAlignment.Center,
-                        Size = new Size(0,72),
-                        TextColor = new Color("#000C2B"),
-                        BackgroundColor = Color.White,
+                        SizeHeight = 44,
+                        TextColor = new Selector<Color>()
+                        {
+                            Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
+                        },
+                        BackgroundColor = new Color("#FAFAFA"),
+                        FontSizeScale = FontSizeScale.UseSystemSetting,
                         ThemeChangeSensitive = false
                     },
-                    Divider = new ViewStyle()
-                    {
-                        SizeHeight = 2.0f,
-                        WidthResizePolicy = ResizePolicyType.FillToParent,
-                        Position = new Position(0, 132),
-                        BackgroundColor = new Color("#0A0E4A"),
-                    },
-                    StartScrollOffset = new Size2D(0, 12),
+                    StartScrollOffset = new Size2D(0, 0),
                 }
             });
 
             // DatePicker base style
             theme.AddStyleWithoutClone("Tizen.NUI.Components.DatePicker", new DatePickerStyle()
             {
-                CellPadding = new Size(50, 339),
+                CellPadding = new Size(12, 220),
 
                 Pickers = new PickerStyle()
                 {
-                    Size = new Size(160, 339),
+                    Size = new Size(80, 220),
                     ItemTextLabel = new TextLabelStyle()
                     {
-                        //FIXME: Should be check PointSize. given size from UX is too large.
-                        PixelSize = 32,
+                        PixelSize = 24,
                         VerticalAlignment = VerticalAlignment.Center,
                         HorizontalAlignment = HorizontalAlignment.Center,
-                        Size = new Size(0,72),
-                        TextColor = new Color("#000C2B"),
-                        BackgroundColor = Color.White,
+                        SizeHeight = 44,
+                        TextColor = new Selector<Color>()
+                        {
+                            Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
+                        },
+                        BackgroundColor = new Color("#FAFAFA"),
+                        FontSizeScale = FontSizeScale.UseSystemSetting,
                         ThemeChangeSensitive = false
                     },
-                    Divider = new ViewStyle()
-                    {
-                        SizeHeight = 2.0f,
-                        WidthResizePolicy = ResizePolicyType.FillToParent,
-                        Position = new Position(0, 132),
-                        BackgroundColor = new Color("#0A0E4A"),
-                    },
-                    StartScrollOffset = new Size2D(0, 12),
+                    StartScrollOffset = new Size2D(0, 0),
                 }
             });
 
             // Menu base style
             theme.AddStyleWithoutClone("Tizen.NUI.Components.Menu", new MenuStyle()
             {
+                BackgroundColor = Color.Transparent,
                 Content = new ViewStyle()
                 {
                     BackgroundColor = new Color("#FFFEFE"),
@@ -766,11 +837,11 @@ namespace Tizen.NUI.Components
                         Disabled = new Color("#CACACA"),
                         Selected = new Color("#FF6200"),
                     },
+                    FontSizeScale = FontSizeScale.UseSystemSetting,
                     ThemeChangeSensitive = false
                 },
                 Icon = new ImageViewStyle()
                 {
-                    Size = new Size(32, 32),
                     Color = new Selector<Color>()
                     {
                         Normal = new Color("#090E21"),