Correcting button styles
authorKamil Stepaniuk/IoT K.stepaniuk UI Sample (PLT) /SRPOL/Designer/Samsung Electronics <k.stepaniuk@samsung.com>
Thu, 19 Mar 2020 12:29:42 +0000 (13:29 +0100)
committerLukasz Stanislawski/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <l.stanislaws@samsung.com>
Fri, 20 Mar 2020 09:22:38 +0000 (10:22 +0100)
Signed-off-by: Kamil Stepaniuk/IoT K.stepaniuk UI Sample (PLT) /SRPOL/Designer/Samsung Electronics <k.stepaniuk@samsung.com>
Oobe/OobeCommon/Styles/ButtonStyles.cs
Oobe/OobeWifi/Controls/WifiView.cs
Oobe/OobeWifi/WifiStep.cs
Oobe/OobeWifi/res/12_icon_addnetwork.png [new file with mode: 0644]
Oobe/OobeWifi/res/Line_94.png [new file with mode: 0644]

index afe319a..b8975cd 100644 (file)
@@ -6,33 +6,46 @@ namespace Oobe.Common.Styles
 {
     public class ButtonStyles
     {
-        public static ButtonStyle Next = new ButtonStyle{
-            BackgroundImage = new Selector<string>{
-                Normal = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_active.svg",
-                Pressed = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_selected.svg",
-            },
-            Text = new TextLabelStyle{
-                PointSize = new Selector<float?>{
+        public static ButtonStyle Next = GetNextButtonStyle();
+        public static ButtonStyle Previous = new ButtonStyle {
+            Text = new TextLabelStyle {
+                PointSize = new Selector<float?> {
                     Normal = 22.0f,
                     Pressed = 24.0f
                 },
-                TextColor = Color.White,
-                Text = "CONTINUE",
+                EnableMarkup = true,
+                Text = "PREVIOUS",
+                TextColor = new Selector<Color> {
+                    Normal = new Color(0.0f, 20.0f / 255.0f, 71 / 255.0f, 1.0f),
+                    Pressed = new Color(41.0f / 255.0f, 91.0f / 255.0f, 178 / 255.0f, 1.0f),
+                }
             },
             Size2D = new Size2D(240, 72),
         };
-        public static ButtonStyle Previous = new ButtonStyle{
-            Text = new TextLabelStyle{
-                PointSize = new Selector<float?>{
+        public static ButtonStyle Skip = GetSkipButtonStyle();
+
+        private static ButtonStyle GetSkipButtonStyle()
+        {
+            var style = GetNextButtonStyle();
+            style.Text.Text = "SKIP";
+            return style;
+        }
+
+        private static ButtonStyle GetNextButtonStyle() => new ButtonStyle {
+            BackgroundImage = new Selector<string>
+            {
+                Normal = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_active.svg",
+                Pressed = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_selected.svg",
+            },
+            Text = new TextLabelStyle
+            {
+                PointSize = new Selector<float?>
+                {
                     Normal = 22.0f,
                     Pressed = 24.0f
                 },
-                EnableMarkup = true,
-                Text = "PREVIOUS",
-                TextColor = new Selector<Color>{
-                    Normal = new Color(0.0f, 20.0f/255.0f, 71/255.0f, 1.0f),
-                    Pressed = new Color(41.0f/255.0f, 91.0f/255.0f, 178/255.0f, 1.0f),
-                }
+                TextColor = Color.White,
+                Text = "CONTINUE",
             },
             Size2D = new Size2D(240, 72),
         };
index 73c7310..05b8ed8 100644 (file)
@@ -37,17 +37,15 @@ namespace Oobe.Wifi.Controls
                         {
                             LinearOrientation = LinearLayout.Orientation.Vertical,
                         },
-                        //BackgroundColor = Color.White,
                         BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "Rectangle_918.png"),
                         //Size = new Size(480, 401),
-                        //BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "Rectangle_918.svg"),
                     };
                     view.Add(CreateHeader(480, 80));
 
                     view.Add(new View() // separator doesn't display
                     {
                         Size2D = new Size(400, 1),
-                        BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "Line_94.svg"),
+                        BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "Line_94.png"),
                         Margin = new Extents(40, 0, 0, 0),
                     });
 
@@ -85,10 +83,10 @@ namespace Oobe.Wifi.Controls
                 Layout = new AbsoluteLayout(),
             };
 
-            manualWifi.Add(new View() // icon displays wrongly
+            manualWifi.Add(new View()
             {
                 Position = new Position(29, 20),
-                BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "12_icon_addnetwork.svg"),
+                BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "12_icon_addnetwork.png"),
             });
 
             manualWifi.Add(new TextLabel("Add new...")
index 95f98de..03f9773 100644 (file)
@@ -1,6 +1,7 @@
 using Oobe.Common.Interfaces;
 using Oobe.Common.Styles;
 using Oobe.Wifi.Controls;
+using Tizen.NUI.Components;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 
@@ -51,36 +52,20 @@ namespace Oobe.Wifi
                 Layout = new AbsoluteLayout(),
             };
 
-            TextLabel prev = new TextLabel("Previous")
+            var prev = new Button(ButtonStyles.Previous)
             {
-                PixelSize = 28.0f,
-                TextColor = new Color(0, 14.0f / 255.0f, 47.0f / 255.0f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = FontsStyles.Light(),
-                HorizontalAlignment = HorizontalAlignment.Center,
-                Position = new Position(121, 33),
+                Position = new Position(56, 10),
+                Size2D = new Size2D(240, 72),
             };
-            //var prev = new Button(ButtonStyles.Previous)
-            //{
-            //    Position = new Position(121, 33),
-            //};
-            //prev.ClickEvent += (s, e) => nav.Previous();
+            prev.ClickEvent += (s, e) => nav.Previous();
             view.Add(prev);
 
-            TextLabel next = new TextLabel("Skip")
+            var next = new Button(ButtonStyles.Skip)
             {
-                PixelSize = 28.0f,
-                TextColor = new Color(0, 14.0f / 255.0f, 47.0f / 255.0f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = FontsStyles.Light(),
-                HorizontalAlignment = HorizontalAlignment.Center,
                 Position = new Position(888, 10),
+                Size2D = new Size2D(240, 72),
             };
-            //var next = new Button(ButtonStyles.Next) //skip
-            //{
-            //    Position = new Position(888, 10),
-            //};
-            //next.ClickEvent += (s, e) => nav.Next();
+            next.ClickEvent += (s, e) => nav.Next();
             view.Add(next);
             return view;
         }
diff --git a/Oobe/OobeWifi/res/12_icon_addnetwork.png b/Oobe/OobeWifi/res/12_icon_addnetwork.png
new file mode 100644 (file)
index 0000000..b04f4f1
Binary files /dev/null and b/Oobe/OobeWifi/res/12_icon_addnetwork.png differ
diff --git a/Oobe/OobeWifi/res/Line_94.png b/Oobe/OobeWifi/res/Line_94.png
new file mode 100644 (file)
index 0000000..9a7d277
Binary files /dev/null and b/Oobe/OobeWifi/res/Line_94.png differ