Add more subtle blur + add blur radius property
MODIFY
WalletWasabi.Fluent/Controls/BlurBehind.cs
WalletWasabi.Fluent/Controls/BlurBehind.cs
@@ -15,12 +15,22 @@ public class CustomBlurBehind : Control
AvaloniaProperty.Register<CustomBlurBehind, ExperimentalAcrylicMaterial>(
"Material");
+ public static readonly StyledProperty<Vector> BlurRadiusProperty =
+ AvaloniaProperty.Register<CustomBlurBehind, Vector>(
+ "BlurRadius", defaultValue: new Vector(10, 10));
+
public ExperimentalAcrylicMaterial Material
{
get => GetValue(MaterialProperty);
set => SetValue(MaterialProperty, value);
}
+ public Vector BlurRadius
+ {
+ get => GetValue(BlurRadiusProperty);
+ set => SetValue(BlurRadiusProperty, value);
+ }
+
static ImmutableExperimentalAcrylicMaterial DefaultAcrylicMaterial =
(ImmutableExperimentalAcrylicMaterial)new ExperimentalAcrylicMaterial()
{
@@ -41,11 +51,13 @@ public class CustomBlurBehind : Control
{
private readonly ImmutableExperimentalAcrylicMaterial _material;
private readonly Rect _bounds;
+ private readonly Vector _blurRadius;
- public BlurBehindRenderOperation(ImmutableExperimentalAcrylicMaterial material, Rect bounds)
+ public BlurBehindRenderOperation(ImmutableExperimentalAcrylicMaterial material, Rect bounds, Vector blurRadius)
{
_material = material;
_bounds = bounds;
+ _blurRadius = blurRadius;
}
public void Dispose()
@@ -92,7 +104,7 @@ public class CustomBlurBehind : Control
using var blurred = SKSurface.Create(skia.GrContext, false, new SKImageInfo(
(int)Math.Ceiling(_bounds.Width),
(int)Math.Ceiling(_bounds.Height), SKImageInfo.PlatformColorType, SKAlphaType.Premul));
- using (var filter = SKImageFilter.CreateBlur(10, 10, SKShaderTileMode.Clamp))
+ using (var filter = SKImageFilter.CreateBlur((int)_blurRadius.X, (int)_blurRadius.Y, SKShaderTileMode.Clamp))
using (var blurPaint = new SKPaint
{
Shader = backdropShader,
@@ -128,6 +140,6 @@ public class CustomBlurBehind : Control
var mat = Material != null
? (ImmutableExperimentalAcrylicMaterial)Material.ToImmutable()
: DefaultAcrylicMaterial;
- context.Custom(new BlurBehindRenderOperation(mat, new Rect(default, Bounds.Size)));
+ context.Custom(new BlurBehindRenderOperation(mat, new Rect(default, Bounds.Size), BlurRadius));
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/MusicControlsView.axaml
WalletWasabi.Fluent/Views/Wallets/MusicControlsView.axaml
<Border Name="PART_MainBorder"
Classes.IsActive="{Binding IsActive, FallbackValue=false}"
TextBlock.FontFamily="{StaticResource MonospacedFont}"
- Padding="20 10" CornerRadius="4 4 0 0" BorderThickness="1 1 1 0" Background="#19FFFFFF"
+ CornerRadius="4 4 0 0" BorderThickness="1 1 1 0"
+ Background="#19FFFFFF"
BorderBrush="#3CFFFFFF">
- <StackPanel Orientation="Horizontal" Spacing="20">
+ <Panel >
+ <controls:CustomBlurBehind BlurRadius="20,20"/>
+ <StackPanel Margin="20 10" Orientation="Horizontal" Spacing="20">
<controls:ScrollingTextBlock MaxWidth="350" Text="{Binding CurrentStatus}" />
<PathIcon Data="{StaticResource stop_regular}" />
</Button>
</StackPanel>
+
+ </Panel>
</Border>
</UserControl>
\ No newline at end of file

Add more subtle blur + add blur radius property