Forráskód Böngészése

add AcrylicPlatformCompensationLevels.

Dan Walmsley 5 éve
szülő
commit
e867a3575a

+ 16 - 0
src/Avalonia.Controls/AcrylicPlatformCompensationLevels.cs

@@ -0,0 +1,16 @@
+namespace Avalonia.Controls
+{
+    /// <summary>
+    /// Defines compensation levels for the platform depending on the transparency level.
+    /// It controls the base opacity level of the 'tracing paper' layer that compensates
+    /// for low blur radius.
+    /// </summary>
+    public struct AcrylicPlatformCompensationLevels
+    {
+        public double TransparentLevel { get; }
+
+        public double BlurLevel { get; }
+
+        public double AcrylicBlurLevel { get; }
+    }
+}

+ 5 - 0
src/Avalonia.Controls/Platform/ITopLevelImpl.cs

@@ -127,5 +127,10 @@ namespace Avalonia.Platform
         /// Gets the current <see cref="WindowTransparencyLevel"/> of the TopLevel.
         /// </summary>
         WindowTransparencyLevel TransparencyLevel { get; }
+
+        /// <summary>
+        /// Gets the <see cref="AcrylicPlatformCompensationLevels"/> for the platform.        
+        /// </summary>
+        AcrylicPlatformCompensationLevels AcrylicCompensationLevels { get; }
     }
 }