瀏覽代碼

Make stub impls return None transparency.

Steven Kirk 2 年之前
父節點
當前提交
703e24ed57

+ 1 - 1
src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs

@@ -91,7 +91,7 @@ namespace Avalonia.Controls.Embedding.Offscreen
 
 
         public void SetTransparencyLevelHint(IReadOnlyList<WindowTransparencyLevel> transparencyLevel) { }
         public void SetTransparencyLevelHint(IReadOnlyList<WindowTransparencyLevel> transparencyLevel) { }
 
 
-        public WindowTransparencyLevel TransparencyLevel { get; private set; }
+        public WindowTransparencyLevel TransparencyLevel => WindowTransparencyLevel.None;
 
 
         public IPopupImpl? CreatePopup() => null;
         public IPopupImpl? CreatePopup() => null;
         
         

+ 1 - 1
src/Avalonia.DesignerSupport/Remote/Stubs.cs

@@ -185,7 +185,7 @@ namespace Avalonia.DesignerSupport.Remote
         {
         {
         }
         }
 
 
-        public WindowTransparencyLevel TransparencyLevel { get; private set; }
+        public WindowTransparencyLevel TransparencyLevel => WindowTransparencyLevel.None;
 
 
         public bool IsClientAreaExtendedToDecorations { get; }
         public bool IsClientAreaExtendedToDecorations { get; }
 
 

+ 1 - 6
src/Browser/Avalonia.Browser/BrowserTopLevelImpl.cs

@@ -225,11 +225,6 @@ namespace Avalonia.Browser
 
 
         public void SetTransparencyLevelHint(IReadOnlyList<WindowTransparencyLevel> transparencyLevel)
         public void SetTransparencyLevelHint(IReadOnlyList<WindowTransparencyLevel> transparencyLevel)
         {
         {
-            ////if (transparencyLevel == WindowTransparencyLevel.None
-            ////    || transparencyLevel == WindowTransparencyLevel.Transparent)
-            ////{
-            ////    TransparencyLevel = transparencyLevel;
-            ////}
         }
         }
 
 
         public Size ClientSize => _clientSize;
         public Size ClientSize => _clientSize;
@@ -249,7 +244,7 @@ namespace Avalonia.Browser
         public IMouseDevice MouseDevice { get; } = new MouseDevice();
         public IMouseDevice MouseDevice { get; } = new MouseDevice();
 
 
         public IKeyboardDevice KeyboardDevice { get; } = BrowserWindowingPlatform.Keyboard;
         public IKeyboardDevice KeyboardDevice { get; } = BrowserWindowingPlatform.Keyboard;
-        public WindowTransparencyLevel TransparencyLevel { get; private set; }
+        public WindowTransparencyLevel TransparencyLevel => WindowTransparencyLevel.None;
         public void SetFrameThemeVariant(PlatformThemeVariant themeVariant)
         public void SetFrameThemeVariant(PlatformThemeVariant themeVariant)
         {
         {
             // not in the standard, but we potentially can use "apple-mobile-web-app-status-bar-style" for iOS and "theme-color" for android.
             // not in the standard, but we potentially can use "apple-mobile-web-app-status-bar-style" for iOS and "theme-color" for android.

+ 1 - 1
src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs

@@ -77,7 +77,7 @@ using Avalonia.Rendering.Composition;
 
 
         public void SetTransparencyLevelHint(IReadOnlyList<WindowTransparencyLevel> transparencyLevel) { }
         public void SetTransparencyLevelHint(IReadOnlyList<WindowTransparencyLevel> transparencyLevel) { }
 
 
-        public WindowTransparencyLevel TransparencyLevel { get; private set; }
+        public WindowTransparencyLevel TransparencyLevel => WindowTransparencyLevel.None;
 
 
         public void SetFrameThemeVariant(PlatformThemeVariant themeVariant) { }
         public void SetFrameThemeVariant(PlatformThemeVariant themeVariant) { }
 
 

+ 1 - 1
src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs

@@ -249,7 +249,7 @@ namespace Avalonia.Win32.Interop.Wpf
 
 
         public void SetTransparencyLevelHint(IReadOnlyList<WindowTransparencyLevel> transparencyLevel) { }
         public void SetTransparencyLevelHint(IReadOnlyList<WindowTransparencyLevel> transparencyLevel) { }
 
 
-        public WindowTransparencyLevel TransparencyLevel { get; private set; }
+        public WindowTransparencyLevel TransparencyLevel => WindowTransparencyLevel.None;
 
 
         public void SetFrameThemeVariant(PlatformThemeVariant themeVariant) { }
         public void SetFrameThemeVariant(PlatformThemeVariant themeVariant) { }
 
 

+ 2 - 2
src/iOS/Avalonia.iOS/AvaloniaView.cs

@@ -159,8 +159,8 @@ namespace Avalonia.iOS
 
 
             // legacy no-op
             // legacy no-op
             public IMouseDevice MouseDevice { get; } = new MouseDevice();
             public IMouseDevice MouseDevice { get; } = new MouseDevice();
-            public WindowTransparencyLevel TransparencyLevel { get; }
-            
+            public WindowTransparencyLevel TransparencyLevel => WindowTransparencyLevel.None;
+
             public void SetFrameThemeVariant(PlatformThemeVariant themeVariant)
             public void SetFrameThemeVariant(PlatformThemeVariant themeVariant)
             {
             {
                 // TODO adjust status bar depending on full screen mode.
                 // TODO adjust status bar depending on full screen mode.

+ 1 - 1
tests/Avalonia.UnitTests/CompositorTestServices.cs

@@ -196,7 +196,7 @@ public class CompositorTestServices : IDisposable
         {
         {
         }
         }
 
 
-        public WindowTransparencyLevel TransparencyLevel { get; }
+        public WindowTransparencyLevel TransparencyLevel => WindowTransparencyLevel.None;
 
 
         public void SetFrameThemeVariant(PlatformThemeVariant themeVariant)
         public void SetFrameThemeVariant(PlatformThemeVariant themeVariant)
         {
         {