[NUI] Apply DialogPage's Scrim UX - BackgroundColor
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 12 Apr 2022 11:11:11 +0000 (20:11 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 20 Apr 2022 08:38:08 +0000 (17:38 +0900)
The latest DialogPage's Scrim UX has been applied.
The Scrim's BackgroundColor has been defined in Theme.

src/Tizen.NUI.Components/Controls/Navigation/DialogPage.cs
src/Tizen.NUI.Components/Theme/DefaultThemeCommon.cs

index aaea2c7..5a22f23 100755 (executable)
@@ -288,9 +288,8 @@ namespace Tizen.NUI.Components
 
         private View CreateDefaultScrim()
         {
-            //FIXME: Needs to separate GUI implementation codes to style cs file.
-            var scrim = new VisualView();
-            scrim.BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.5f);
+            var scrimStyle = ThemeManager.GetStyle("Tizen.NUI.Components.DialogPage.Scrim");
+            var scrim = new VisualView(scrimStyle);
             //FIXME: Needs to set proper size to Scrim.
             scrim.Size = NUIApplication.GetDefaultWindow().Size;
             scrim.TouchEvent += (object source, TouchEventArgs e) =>
index 7f20990..f6c775c 100755 (executable)
@@ -724,6 +724,13 @@ namespace Tizen.NUI.Components
                 },
             });
 
+            // AlertDialog base style
+            theme.AddStyleWithoutClone("Tizen.NUI.Components.DialogPage.Scrim", new ViewStyle()
+            {
+                BackgroundColor = new Color("#090E21"),
+                Opacity = 0.5f,
+            });
+
             return theme;
         }
     }