Browse Source

add AcrylicPlatformCompensationLevels.

pull/4043/head
Dan Walmsley 6 years ago
parent
commit
e867a3575a
  1. 16
      src/Avalonia.Controls/AcrylicPlatformCompensationLevels.cs
  2. 5
      src/Avalonia.Controls/Platform/ITopLevelImpl.cs

16
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
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; }
}
}

Loading…
Cancel
Save