wifi: adjust popup to new guideline 81/234081/2
authorLukasz Stanislawski <lukasz.stanislawski@gmail.com>
Thu, 21 May 2020 12:47:23 +0000 (14:47 +0200)
committerLukasz Stanislawski <lukasz.stanislawski@gmail.com>
Thu, 21 May 2020 13:44:32 +0000 (15:44 +0200)
Change-Id: I9d7e0f7befe601f60e3f9a80f5712c59331f733e

Oobe/Oobe.Wifi/Controls/Wifi/AddNewNetworkPupup.cs
Oobe/Oobe.Wifi/Controls/Wifi/Translations.ko-KR.resx
Oobe/Oobe.Wifi/Controls/Wifi/Translations.resx
Oobe/Oobe.Wifi/Controls/Wifi/WifiPasswordPopup.cs
Oobe/Oobe.Wifi/WifiStep.cs

index 8bfd32ae1ef003db85fc8cbe70b186011798a834..981b59612420d8e5ce385d9151279103f2d99ad4 100644 (file)
@@ -39,16 +39,13 @@ namespace Oobe.Wifi.Controls.Wifi
         };
         NewNetworkViewMode currentViewMode;
         TextLabel titleLabel;
-        TextLabel ssidLabel;
         TextField ssidTextField;
         View ssidUnderline;
-        TextLabel securityTypeLabel;
         TextLabel selectedSecurityTypeLabel;
         TapGestureDetector securityTypeDetector;
         TextLabel usernameLabel;
         TextField usernameTextField;
         View usernameUnderline;
-        TextLabel passwordLabel;
         PasswordEntry passwordEntry;
         View passwordUnderline;
         Button revealButton;
@@ -62,11 +59,11 @@ namespace Oobe.Wifi.Controls.Wifi
         static Color largeTextColor => new Color(0.0f, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f);
         static Color smallTextColor => new Color(0.0f, 0xC / 255.0f, 0x2B / 255.0f, 1.0f);
         static Size labelSize => new Size(600, 19);
-        static Size textControlSize => new Size(583, 27);
-        static Size passwordControlSize => new Size(583, 25);
+        static Size textControlSize => new Size(680, 27);
+        static Size passwordControlSize => new Size(583, 27);
         int labelFontSize = 14;
         int textFontSize = 22;
-        int passwordFontSize = 20;
+        int passwordFontSize = 22;
 
         public AddNewNetworkPupup()
         {
@@ -112,13 +109,14 @@ namespace Oobe.Wifi.Controls.Wifi
             return textField;
         }
 
-        View CreateUnderline(Position2D position = null)
+        View CreateUnderline(Position2D position = null, Size2D size = null)
         {
             position ??= new Position2D();
+            size ??= new Size2D(728, 1);
             return new View()
             {
                 Position = position,
-                Size = new Size(600, 1),
+                Size = size,
                 BackgroundColor = new Color(0xC3 / 255.0f, 0xCA / 255.0f, 0xD2 / 255.0f, 1.0f)
             };
         }
@@ -134,7 +132,7 @@ namespace Oobe.Wifi.Controls.Wifi
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
                 TextColor = largeTextColor,
-                TranslatablePlaceholderText = "WIFI_SECURITY_KEY",
+                TranslatablePlaceholderText = "WIFI_PASSWORD",
                 HorizontalAlignment = HorizontalAlignment.Begin,
                 VerticalAlignment = VerticalAlignment.Center,
                 Revealed = false
@@ -175,18 +173,12 @@ namespace Oobe.Wifi.Controls.Wifi
             };
             this.Add(titleLabel);
 
-            ssidLabel = CreateTextLabel("WIFI_SSID", new Position2D(104, 80));
-            this.Add(ssidLabel);
-
-            ssidTextField = CreateTextField("WIFI_SSID", new Position2D(121, 97));
+            ssidTextField = CreateTextField("WIFI_SSID", new Position2D(40, 91));
             this.Add(ssidTextField);
 
-            ssidUnderline = CreateUnderline(new Position2D(104, 123));
+            ssidUnderline = CreateUnderline(new Position2D(40, 117));
             this.Add(ssidUnderline);
 
-            securityTypeLabel = CreateTextLabel("WIFI_SECURITY_TYPE", new Position2D(104, 144));
-            this.Add(securityTypeLabel);\r
-
             this.Add(CreateSecurityTypeButton());
 
             cancelButton = new Button(ButtonStyles.Cancel)
@@ -299,13 +291,14 @@ namespace Oobe.Wifi.Controls.Wifi
         {\r
             var view = new View()\r
             {\r
-                Size = new Size(583, 30),\r
-                Position2D = new Position2D(121, 161),\r
+                Size = new Size(728, 72),\r
+                Position2D = new Position2D(40, 148),\r
                 Layout = new AbsoluteLayout(),\r
             };\r
             selectedSecurityTypeLabel = new TextLabel()\r
             {\r
                 Size = new Size(200, 28),\r
+                Position = new Position2D(0, 23),
                 PixelSize = 22,\r
                 TranslatableText = currentSecurityType.GetUIName(),\r
                 FontStyle = new PropertyMap().AddRegularFontStyle(),\r
@@ -318,7 +311,7 @@ namespace Oobe.Wifi.Controls.Wifi
             view.Add(new View()\r
             {\r
                 BackgroundImage = arrowImagePath,\r
-                Position = new Position(568, 2),\r
+                Position = new Position(696, 31),\r
             });\r
             securityTypeDetector = new TapGestureDetector();\r
             securityTypeDetector.Attach(view);\r
@@ -340,7 +333,7 @@ namespace Oobe.Wifi.Controls.Wifi
 
         void ResetViewToNoPassword()
         {
-            Size = new Size(808, 322);
+            Size = new Size(808, 343);
             Position = new Position2D(236, 118);
 
             addButton.Position = new Position2D(488, ((int)Size.Height) - 96);
@@ -367,13 +360,6 @@ namespace Oobe.Wifi.Controls.Wifi
                 usernameUnderline = null;
             }
 
-            if (!(passwordLabel is null))
-            {
-                passwordLabel.Unparent();
-                passwordLabel.Dispose();
-                passwordLabel = null;
-            }
-
             if (!(passwordEntry is null))
             {
                 passwordEntry.Unparent();
@@ -400,7 +386,7 @@ namespace Oobe.Wifi.Controls.Wifi
 
         void ResetViewToPasswordOnly()
         {
-            Size = new Size2D(808, 382);
+            Size = new Size2D(808, 412);
             Position = new Position2D(236, 59);
 
             addButton.Position = new Position2D(488, ((int)Size.Height) - 96);
@@ -427,12 +413,6 @@ namespace Oobe.Wifi.Controls.Wifi
                 usernameUnderline = null;
             }
 
-            if (passwordLabel is null)
-            {
-                passwordLabel = CreateTextLabel("WIFI_SECURITY_KEY");
-                this.Add(passwordLabel);
-            }
-
             if (passwordEntry is null)
             {
                 passwordEntry = CreatePasswordEntry();
@@ -441,7 +421,7 @@ namespace Oobe.Wifi.Controls.Wifi
 
             if (passwordUnderline is null)
             {
-                passwordUnderline = CreateUnderline();
+                passwordUnderline = CreateUnderline(null, new Size2D(680, 1));
                 this.Add(passwordUnderline);
             }
 
@@ -451,10 +431,9 @@ namespace Oobe.Wifi.Controls.Wifi
                 this.Add(revealButton);
             }
 
-            passwordLabel.Position = new Position2D(104, 208);
-            passwordEntry.Position = new Position2D(121, 225);
-            passwordUnderline.Position = new Position2D(104, 251);
-            revealButton.Position = new Position2D(704, 214);
+            passwordEntry.Position = new Position2D(40, 232);
+            passwordUnderline.Position = new Position2D(40, 258);
+            revealButton.Position = new Position2D(728, 232);
 
             currentViewMode = NewNetworkViewMode.PasswordOnly;
         }
@@ -485,12 +464,6 @@ namespace Oobe.Wifi.Controls.Wifi
                 this.Add(usernameUnderline);
             }
 
-            if (passwordLabel is null)
-            {
-                passwordLabel = CreateTextLabel("WIFI_SECURITY_KEY");
-                this.Add(passwordLabel);
-            }
-
             if (passwordEntry is null)
             {
                 passwordEntry = CreatePasswordEntry();
@@ -512,10 +485,9 @@ namespace Oobe.Wifi.Controls.Wifi
             usernameLabel.Position2D = new Position2D(104, 208);
             usernameTextField.Position2D = new Position2D(121, 225);
             usernameUnderline.Position2D = new Position2D(104, 251);
-            passwordLabel.Position2D = new Position2D(104, 272);
-            passwordEntry.Position2D = new Position2D(121, 289);
-            passwordUnderline.Position2D = new Position2D(104, 315);
-            revealButton.Position = new Position2D(704, 278);
+            passwordEntry.Position2D = new Position2D(40, 232);
+            passwordUnderline.Position2D = new Position2D(40, 258);
+            revealButton.Position = new Position2D(728, 232);
 
             currentViewMode = NewNetworkViewMode.UserPassword;
         }
index 2589dbb58bb4ca33dee4fb286ebf65cba61ea201..9c122eb2f338b02ef0e9d0fffbc9e4c6e36d6300 100644 (file)
   <data name="WIFI_USERNAME" xml:space="preserve">
     <value>사용자 이름</value>
   </data>
-</root>
\ No newline at end of file
+  <data name="WIFI_PASSWORD" xml:space="preserve">
+    <value>암호</value>
+  </data>
+</root>
index 64da83f5d2e029d4890ed19d55f0a08457734e71..c8aef66b6722c4831a79e58fffe5f921eb88f2c2 100644 (file)
   <data name="WIFI_SECURITY_TYPE_WPA2PSK" xml:space="preserve">
     <value>WPA2 PSK</value>
   </data>
-</root>
\ No newline at end of file
+  <data name="WIFI_PASSWORD" xml:space="preserve">
+    <value>Password</value>
+  </data>
+</root>
index a21c37b28849a721c5bbfe9a9728935765d8ad6f..dac5d8bc0f314373804f9bb43b1e726246dde5f2 100644 (file)
@@ -50,59 +50,46 @@ namespace Oobe.Wifi.Controls.Wifi
 
             this.Add(new View() //underline
             {
-                Size = new Size(584, 1),
-                Position = new Position(103, 160),
+                Size = new Size(672, 1),
+                Position = new Position(40, 117),
                 BackgroundColor = new Color(0xC3 / 255.0f, 0xCA / 255.0f, 0xD2 / 255.0f, 1.0f),
             });
 
-            passwordEntry = new PasswordEntry()
-            {
-                Size = new Size(584, 27),
-                Position = new Position(112, 133),
-                MaxLength = maxPasswordLength,
-                PixelSize = 22,
-                TextColor = new Color(0, 0x0C / 255.0f, 0x2B / 255.0f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                Revealed = false,
-            };
-            passwordEntry.TextChanged += (s, e) => UpdateOKButton();
-
-            this.Add(passwordEntry);
-
             var titleLabel = new TextLabel
             {
-                Size = new Size(808, 35),
-                Position = new Position(0, 19),
-                TranslatableText = "WIFI_ENTER_PASSWORD",
-                PixelSize = 28,
+                Size = new Size(728, 33),
+                Position = new Position(40, 24),
+                //no translatableText because of dynamic content
+                Text = string.Format(Translations.WIFI_ENTER_PASSWORD_TO_JOIN, wifiAp.NetworkInformation.Essid),
+                PixelSize = 26,
                 TextColor = new Color(0, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f),
                 FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddLightFontStyle(),
+                FontStyle = new PropertyMap().AddRegularFontStyle(),
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
             };
             this.Add(titleLabel);
 
-            var subtitleLabel = new TextLabel
+            passwordEntry = new PasswordEntry()
             {
-                Size = new Size(808, 26),
-                Position = new Position(0, 68),
-                //no translatableText because of dynamic content
-                Text = string.Format(Translations.WIFI_ENTER_PASSWORD_TO_JOIN, wifiAp.NetworkInformation.Essid),
-                PixelSize = 20,
-                TextColor = new Color(0, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f),
+                Size = new Size(624, 27),
+                Position = new Position(40, 91),
+                MaxLength = maxPasswordLength,
+                PixelSize = 22,
+                TextColor = new Color(0, 0x0C / 255.0f, 0x2B / 255.0f, 1.0f),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
-                HorizontalAlignment = HorizontalAlignment.Center,
-                VerticalAlignment = VerticalAlignment.Center,
+                Revealed = false,
+                TranslatablePlaceholderText = "WIFI_PASSWORD",
             };
-            this.Add(subtitleLabel);
+            passwordEntry.TextChanged += (s, e) => UpdateOKButton();
+
+            this.Add(passwordEntry);
 
             connectionFailure = new TextLabel
             {
-                Size = new Size(120, 16),
-                Position = new Position(116, 166),
+                Size = new Size(624, 22),
+                Position = new Position(40, 117),
                 TranslatableText = "WIFI_INVALID_PASSWORD",
                 PixelSize = 12,
                 TextColor = new Color(0xAA / 255.0f, 0x18 / 255.0f, 0x18 / 255.0f, 1.0f),
@@ -117,7 +104,7 @@ namespace Oobe.Wifi.Controls.Wifi
             revealButton = new Button(ButtonStyles.Reveal)
             {
                 Size = new Size(48, 48),
-                Position = new Position(696, 120),
+                Position = new Position(720, 79),
             };
             revealButton.ClickEvent += (s, e) => TogglePasswordVisibility();
             this.Add(revealButton);
@@ -125,7 +112,7 @@ namespace Oobe.Wifi.Controls.Wifi
             cancelButton = new Button(ButtonStyles.Cancel)
             {
                 Size = new Size(240, 72),
-                Position = new Position(80, 200)
+                Position = new Position(80, 175)
             };
             cancelButton.ClickEvent += (s, e) =>
             {
@@ -136,7 +123,7 @@ namespace Oobe.Wifi.Controls.Wifi
             okButton = new Button(ButtonStyles.OK)
             {
                 Size = new Size(240, 72),
-                Position = new Position(488, 200),
+                Position = new Position(488, 175),
                 IsEnabled = false
             };
             okButton.ClickEvent += async (s, e) =>
index 14c0d8d98dd49d019e638cd39b4d24f9e5e45021..e50f73a2d7e8a43957259d6d271caa9eb2dd84aa 100644 (file)
@@ -48,7 +48,7 @@ namespace Oobe.Wifi
                 TranslatableText = "CHOOSE_WIFI_NETWORK",
                 Size = new Size(0, 50),
                 WidthResizePolicy = ResizePolicyType.FillToParent,
-                Margin = new Extents(0, 40, 24, 8),
+                Margin = new Extents(0, 0, 40, 24),
                 PixelSize = 40.0f,
                 TextColor = new Color(0, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f),
                 FontFamily = "BreezeSans",