update view border
authorYurii Zinchuk/Tizen Services & IoT (PLT) /SRPOL/Engineer/Samsung Electronics <y.zinchuk@samsung.com>
Fri, 23 Jun 2023 08:41:14 +0000 (10:41 +0200)
committerYurii Zinchuk/Tizen Services & IoT (PLT) /SRPOL/Engineer/Samsung Electronics <y.zinchuk@samsung.com>
Fri, 30 Jun 2023 09:56:54 +0000 (11:56 +0200)
SettingView/SettingView.cs

index 74977b93a0454f2e4f28d29e9fd2e4e04993d15c..ff5c273c49346b18093ba6af4a68b596f49d2118 100644 (file)
@@ -30,6 +30,7 @@ namespace SettingView
 {
     public class Program : NUIApplication
     {
+        private static SettingViewBorder appCustomBorder;
         private ContentPage mMainPage;
 
         public Program(Size2D windowSize, Position2D windowPosition, ThemeOptions themeOptions, IBorderInterface borderInterface)
@@ -57,6 +58,29 @@ namespace SettingView
             ThemeManager.ThemeChanged += ThemeManager_ThemeChanged;
             GadgetManager.Instance.CustomizationChanged += CustomizationChanged;
 
+            GadgetNavigation.OnWindowModeChanged += (ob, fullScreenMode) =>
+            {
+                if (fullScreenMode)
+                {
+                    if (appCustomBorder.BorderWindow is null || appCustomBorder.BorderWindow.IsMaximized())
+                    {
+                        return;
+                    }
+
+                    appCustomBorder.OverlayMode = true;
+                    appCustomBorder.BorderWindow.Maximize(true);
+                }
+                else
+                {
+                    if (appCustomBorder.BorderWindow is null || appCustomBorder.BorderWindow.IsMinimized())
+                    {
+                        return;
+                    }
+
+                    appCustomBorder.BorderWindow.Maximize(false);
+                }
+            };
+
             LogScalableInfo();
         }
 
@@ -246,7 +270,7 @@ namespace SettingView
             // INFO: it looks like size of custom border is not included in total window size
             Size2D size = new Size2D(width, height);
             Position2D position = new Position2D((screenWidth - width) / 2, (screenHeight - height) / 2 - (int)(bottomMargin * screenHeight));
-            var appCustomBorder = new SettingViewBorder();
+            appCustomBorder = new SettingViewBorder();
 
             var app = new Program(size, position, ThemeOptions.PlatformThemeEnabled, appCustomBorder);