|
|
|
@ -199,9 +199,7 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
_scaling = ValidateScaling(impl.RenderScaling); |
|
|
|
_actualTransparencyLevel = PlatformImpl.TransparencyLevel; |
|
|
|
|
|
|
|
_source.Renderer.CompositionTarget.TransparencyLevel = |
|
|
|
ToCompositionTransparencyLevel(_actualTransparencyLevel); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -715,8 +713,6 @@ namespace Avalonia.Controls |
|
|
|
} |
|
|
|
|
|
|
|
ActualTransparencyLevel = transparencyLevel; |
|
|
|
Renderer.CompositionTarget.TransparencyLevel = |
|
|
|
ToCompositionTransparencyLevel(transparencyLevel); |
|
|
|
} |
|
|
|
|
|
|
|
protected override void OnApplyTemplate(TemplateAppliedEventArgs e) |
|
|
|
@ -835,18 +831,5 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
return scaling; |
|
|
|
} |
|
|
|
|
|
|
|
private static CompositionTransparencyLevel ToCompositionTransparencyLevel(WindowTransparencyLevel level) |
|
|
|
{ |
|
|
|
if (level == WindowTransparencyLevel.Transparent) |
|
|
|
return CompositionTransparencyLevel.Transparent; |
|
|
|
if (level == WindowTransparencyLevel.Blur) |
|
|
|
return CompositionTransparencyLevel.Blur; |
|
|
|
if (level == WindowTransparencyLevel.AcrylicBlur) |
|
|
|
return CompositionTransparencyLevel.AcrylicBlur; |
|
|
|
if (level == WindowTransparencyLevel.Mica) |
|
|
|
return CompositionTransparencyLevel.Mica; |
|
|
|
return CompositionTransparencyLevel.None; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|