From e867a3575a67f5292fc72c2aea8edeacaf3963a1 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Sun, 5 Jul 2020 11:51:25 -0300 Subject: [PATCH] add AcrylicPlatformCompensationLevels. --- .../AcrylicPlatformCompensationLevels.cs | 16 ++++++++++++++++ src/Avalonia.Controls/Platform/ITopLevelImpl.cs | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 src/Avalonia.Controls/AcrylicPlatformCompensationLevels.cs diff --git a/src/Avalonia.Controls/AcrylicPlatformCompensationLevels.cs b/src/Avalonia.Controls/AcrylicPlatformCompensationLevels.cs new file mode 100644 index 0000000000..13dc736463 --- /dev/null +++ b/src/Avalonia.Controls/AcrylicPlatformCompensationLevels.cs @@ -0,0 +1,16 @@ +namespace Avalonia.Controls +{ + /// + /// 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. + /// + public struct AcrylicPlatformCompensationLevels + { + public double TransparentLevel { get; } + + public double BlurLevel { get; } + + public double AcrylicBlurLevel { get; } + } +} diff --git a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs index 6472fba48e..0d77cbf802 100644 --- a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs +++ b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs @@ -127,5 +127,10 @@ namespace Avalonia.Platform /// Gets the current of the TopLevel. /// WindowTransparencyLevel TransparencyLevel { get; } + + /// + /// Gets the for the platform. + /// + AcrylicPlatformCompensationLevels AcrylicCompensationLevels { get; } } }