fix button animation and pointer over opacity.
MODIFY
WalletWasabi.Fluent/Controls/AnimatedButton.axaml
WalletWasabi.Fluent/Controls/AnimatedButton.axaml
xmlns:ia="using:Avalonia.Xaml.Interactions.Core"
xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls">
<Design.PreviewWith>
- <c:AnimatedButton InitialOpacity="0.6" PointerOverOpacity="0.75" />
+ <c:AnimatedButton />
</Design.PreviewWith>
<Style Selector="Button > Panel > PathIcon">
<Setter Property="Opacity" Value="{Binding $parent[c:AnimatedButton].InitialOpacity}" />

MODIFY
WalletWasabi.Fluent/Controls/AnimatedButton.axaml.cs
WalletWasabi.Fluent/Controls/AnimatedButton.axaml.cs
@@ -10,6 +10,11 @@ namespace WalletWasabi.Fluent.Controls
{
public class AnimatedButton : TemplatedControl
{
+ static AnimatedButton()
+ {
+ AffectsRender<AnimatedButton>(InitialOpacityProperty);
+ }
+
public static readonly StyledProperty<ICommand> CommandProperty =
AvaloniaProperty.Register<AnimatedButton, ICommand>(nameof(Command));
@@ -23,10 +28,10 @@ namespace WalletWasabi.Fluent.Controls
AvaloniaProperty.Register<AnimatedButton, object>(nameof(CommandParameter));
public static readonly StyledProperty<double> InitialOpacityProperty =
- AvaloniaProperty.Register<AnimatedButton, double>(nameof(InitialOpacity), 0.5);
+ AvaloniaProperty.Register<AnimatedButton, double>(nameof(InitialOpacity), 0.6);
public static readonly StyledProperty<double> PointerOverOpacityProperty =
- AvaloniaProperty.Register<AnimatedButton, double>(nameof(PointerOverOpacity), 0.75);
+ AvaloniaProperty.Register<AnimatedButton, double>(nameof(PointerOverOpacity), 1);
public static readonly StyledProperty<bool> AnimateIconProperty =
AvaloniaProperty.Register<AnimatedButton, bool>(nameof(AnimateIcon));

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/SendView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/SendView.axaml
<Style Selector="DockPanel > Label">
<Setter Property="MinWidth" Value="80" />
</Style>
+ <Style Selector="c|AnimatedButton.flash">
+ <Setter Property="InitialOpacity" Value="0.8" />
+ </Style>
<Style Selector="c|AnimatedButton.flash /template/ PathIcon#PART_IconNormal">
<Setter Property="Foreground" Value="{DynamicResource SystemAccentColor}" />
- <Setter Property="Opacity" Value="1" />
<Style.Animations>
<Animation Duration="0.25" IterationCount="6"
- PlaybackDirection="Alternate"
+ PlaybackDirection="AlternateReverse"
Easing="{StaticResource FluentEasing}">
<KeyFrame KeyTime="0:0:0.0">
<Setter Property="Opacity" Value="0.1" />

fix button animation and pointer over opacity.