Center all popups 59/265259/2
authorKrzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <k.wieclaw@samsung.com>
Tue, 12 Oct 2021 17:15:39 +0000 (19:15 +0200)
committerKrzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <k.wieclaw@samsung.com>
Thu, 14 Oct 2021 17:27:00 +0000 (19:27 +0200)
Change-Id: Iedf5fc070b7e61f46833a295de1f59d8a3c31ccb
Signed-off-by: Krzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <k.wieclaw@samsung.com>
Oobe/Oobe.Wifi/Controls/Wifi/AddNewNetworkPupup.cs
Oobe/Oobe.Wifi/Controls/Wifi/ChangeSecurityTypePopup.cs
Oobe/Oobe.Wifi/Controls/Wifi/WifiPasswordPopup.cs
Oobe/Oobe.Wifi/Controls/Wifi/WifiView.cs

index bbc72f47cab4f975cc40597814851599f526a2d8..740a2e1224e2788b4b23b20971dcc09b81793f2d 100644 (file)
@@ -341,7 +341,7 @@ namespace Oobe.Wifi.Controls.Wifi
         private void OpenSecurityTypePopup()
         {
             var view = new ChangeSecurityTypePopup(currentSecurityType);
-            var popup = new Oobe.Common.Utils.Popup(view, backgroundOpacity: 0f);
+            var popup = new Oobe.Common.Utils.Popup(view, backgroundOpacity: 0f, centered: true);
             view.OnDismiss += () =>
             {
                 ResetViewTo(view.WifiUISecurityType);
@@ -353,7 +353,6 @@ namespace Oobe.Wifi.Controls.Wifi
         private void ResetViewToNoPassword()
         {
             Size = new Size(808, 343);
-            Position = new Position2D(236, 118);
 
             addButton.Position = DpUtils.ToPixels(new Position2D(488, 343 - 96));
             cancelButton.Position = DpUtils.ToPixels(new Position2D(80, 343 - 96));
@@ -406,7 +405,6 @@ namespace Oobe.Wifi.Controls.Wifi
         private void ResetViewToPasswordOnly()
         {
             Size = DpUtils.ToPixels(new Size2D(808, 412));
-            Position = DpUtils.ToPixels(new Position2D(236, 59));
 
             addButton.Position = DpUtils.ToPixels(new Position2D(488, 412 - 96));
             cancelButton.Position = DpUtils.ToPixels(new Position2D(80, 412 - 96));
@@ -460,7 +458,6 @@ namespace Oobe.Wifi.Controls.Wifi
         private void ResetViewToUserPassword()
         {
             Size = DpUtils.ToPixels(new Size2D(808, 440));
-            Position = DpUtils.ToPixels(new Position2D(236, 0));
 
             addButton.Position = DpUtils.ToPixels(new Position2D(488, 440 - 96));
             cancelButton.Position = DpUtils.ToPixels(new Position2D(80, 440 - 96));
index e872fd6ed8061fad77e4a78119aa40cdf7001df1..57dace225c8e9ab8a2248a76760d2590f3f89f3f 100644 (file)
@@ -41,7 +41,7 @@ namespace Oobe.Wifi.Controls.Wifi
             this.originalWifUISecurityType = wifUISecurityType;
             this.WifiUISecurityType = wifUISecurityType;
             this.Size = DpUtils.ToPixels(new Size(808, 440));
-            this.Position = DpUtils.ToPixels(new Position(236, 140));
+
             this.BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "08_popup_body.png");
 
             InitializeStaticElements();
index 6ae45b50e137a7337471d7489faa0b3cde4139b5..0a986bfea011f00ee8560559313335ef8c25b851 100644 (file)
@@ -43,7 +43,6 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             BackgroundImage = backgroundImagePath;
             Size = DpUtils.ToPixels(new Size(808, 271));
-            Position2D = DpUtils.ToPixels(new Position2D(236, 116));
             this.wifiAp = wifiAp;
 
             this.Add(new View() // underline
index bace854d4fe9ca3e75ca6d35b78d405f05b347f0..4217d3c5c0dcae1ec88beff16441fc2c2405f9c5 100644 (file)
@@ -163,7 +163,7 @@ namespace Oobe.Wifi.Controls.Wifi
         private static void ShowAddNetworkPopup()
         {
             var view = new AddNewNetworkPupup();
-            var popup = new Common.Utils.Popup(view);
+            var popup = new Common.Utils.Popup(view, centered: true);
             view.OnDismiss += popup.Dismiss;
             popup.Show();
         }
@@ -171,7 +171,7 @@ namespace Oobe.Wifi.Controls.Wifi
         private static void ShowPasswordPopup(WiFiAP wifiAp)
         {
             var view = new WifiPasswordPopup(wifiAp);
-            var popup = new Common.Utils.Popup(view);
+            var popup = new Common.Utils.Popup(view, centered: true);
             view.OnDismiss += popup.Dismiss;
             popup.Show();
         }