add test to settings + make it use fluent easing
MODIFY
WalletWasabi.Fluent/App.xaml
WalletWasabi.Fluent/App.xaml
<Application.Resources>
<x:Double x:Key="ToggleSwitchThemeMinWidth">0</x:Double>
+ <KeySpline x:Key="FluentKeySpline">0.4,0,0.6,1</KeySpline>
+ <SplineEasing x:Key="FluentEasing" X1="0.4" X2="0" Y1="0.6" Y2="1"/>
</Application.Resources>
<Application.Styles>

MODIFY
WalletWasabi.Fluent/Controls/ContentArea.axaml
WalletWasabi.Fluent/Controls/ContentArea.axaml
<Style Selector="c|ContentArea /template/ DockPanel#MainDockPanel">
<Setter Property="Transitions">
<Transitions>
- <DoubleTransition Property="Opacity" Duration="3"/>
- <TransformOperationsTransition Property="RenderTransform" Duration="3" Easing="QuadraticEaseIn" />
+ <DoubleTransition Property="Opacity" Duration="0.27" Easing="{StaticResource FluentEasing}"/>
+ <TransformOperationsTransition Property="RenderTransform" Duration="0.27" Easing="{StaticResource FluentEasing}"/>
</Transitions>
</Setter>
</Style>
<Style Selector="c|ContentArea[IsBusy=True] /template/ DockPanel#MainDockPanel">
<Setter Property="Opacity" Value="0"/>
- <Setter Property="RenderTransform" Value="scale(0.75)"/>
+ <Setter Property="RenderTransform" Value="scale(0.98)"/>
</Style>
<Style Selector="c|ContentArea[IsBusy=False] /template/ DockPanel#MainDockPanel">
<Style Selector="c|ContentArea[IsBusy=False] /template/ c|ProgressRing#LoadingRing">
<Setter Property="Opacity" Value="0"/>
- <Setter Property="RenderTransform" Value="scale(0.75)"/>
+ <Setter Property="RenderTransform" Value="scale(0.98)"/>
</Style>
<Style Selector="c|ContentArea /template/ c|ProgressRing#LoadingRing">
<Setter Property="Transitions">
<Transitions>
- <DoubleTransition Property="Opacity" Duration="3"/>
- <TransformOperationsTransition Property="RenderTransform" Duration="3" Easing="QuadraticEaseIn" />
+ <DoubleTransition Property="Opacity" Duration="0.27" Easing="{StaticResource FluentEasing}"/>
+ <TransformOperationsTransition Property="RenderTransform" Duration="0.27" Easing="{StaticResource FluentEasing}" />
</Transitions>
</Setter>
+ <Setter Property="Width" Value="100"/>
+ <Setter Property="Height" Value="100"/>
</Style>
</Styles>

MODIFY
WalletWasabi.Fluent/Controls/ProgressRing.xaml
WalletWasabi.Fluent/Controls/ProgressRing.xaml
<Style Selector="c|ProgressRing:indeterminate /template/ c|ProgressRingArc.IndeterminateRing">
<Style.Animations>
<Animation Duration="0:0:1" IterationCount="Infinite">
- <KeyFrame Cue="0%" KeySpline="0.4,0,0.6,1">
+ <KeyFrame Cue="0%" KeySpline="{StaticResource FluentKeySpline}">
<Setter Property="(RotateTransform.Angle)" Value="0" />
</KeyFrame>
- <KeyFrame Cue="100%" KeySpline="0.4,0,0.6,1">
+ <KeyFrame Cue="100%" KeySpline="{StaticResource FluentKeySpline}">
<Setter Property="(RotateTransform.Angle)" Value="360" />
</KeyFrame>
</Animation>

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
@@ -4,6 +4,7 @@ using System.Linq;
using System.Net;
using System.Reactive;
using System.Reactive.Linq;
+using System.Reactive.Subjects;
using System.Threading.Tasks;
using Avalonia;
using Avalonia.Markup.Xaml.Styling;
@@ -106,7 +107,7 @@ namespace WalletWasabi.Fluent.ViewModels.Settings
OpenConfigFileCommand = ReactiveCommand.CreateFromTask(OpenConfigFileAsync);
TextBoxLostFocusCommand = ReactiveCommand.Create(Save);
-
+ LoadingTestCommand = ReactiveCommand.CreateFromTask(LoadingTest);
Observable
.Merge(OpenConfigFileCommand.ThrownExceptions)
.Merge(TextBoxLostFocusCommand.ThrownExceptions)
@@ -180,8 +181,22 @@ namespace WalletWasabi.Fluent.ViewModels.Settings
MediumPrivacyLevel = x - 1;
}
});
+ isbusy = new Subject<bool>();
+ IsBusyObservable = isbusy.ObserveOn(RxApp.MainThreadScheduler).Select(x => x);
+
+ }
+
+ public IObservable<bool> IsBusyObservable { get; }
+ private Subject<bool> isbusy;
+ private async Task LoadingTest()
+ {
+ isbusy.OnNext(true);
+ await Task.Delay(5_000);
+ isbusy.OnNext(false);
}
+ public ReactiveCommand<Unit, Unit> LoadingTestCommand { get; set; }
+
private object ConfigLock { get; } = new object();
public ReactiveCommand<Unit, Unit> OpenConfigFileCommand { get; }

MODIFY
WalletWasabi.Fluent/Views/AddWallet/RecoverWalletView.axaml
WalletWasabi.Fluent/Views/AddWallet/RecoverWalletView.axaml
EnableBack="True"
EnableCancel="True" CancelContent="Cancel"
EnableNext="True" NextContent="Finish"
- x:CompileBindings="False" IsBusy="{Binding IsBusyObservable^}">
+ IsBusy="{Binding IsBusyObservable^}">
<StackPanel>
<DockPanel>
<PathIcon Name="IconCheckmark" Classes="checkMark" Margin="15 42 0 0" VerticalAlignment="Top"

MODIFY
WalletWasabi.Fluent/Views/Settings/SettingsPageView.xaml
WalletWasabi.Fluent/Views/Settings/SettingsPageView.xaml
xmlns:settings="clr-namespace:WalletWasabi.Fluent.ViewModels.Settings"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="settings:SettingsPageViewModel"
+ x:CompileBindings="True"
x:Class="WalletWasabi.Fluent.Views.Settings.SettingsPageView">
<UserControl.Styles>
<Style Selector="TabItem">
<Setter Property="Padding" Value="0" />
</Style>
</UserControl.Styles>
- <c:ContentArea Title="Settings" Caption="Manage appearance, privacy and other settings">
+ <c:ContentArea Title="Settings" Caption="Manage appearance, privacy and other settings" IsBusy="{Binding IsBusyObservable^}">
+ <StackPanel>
<TabControl>
<TabItem Header="General">
<v:GeneralSettingsView />
<v:BitCoinSettingsView />
</TabItem>
</TabControl>
+ <Button Command="{Binding LoadingTestCommand}">Activate Loading Animation</Button>
+ </StackPanel>
</c:ContentArea>
</UserControl>
\ No newline at end of file

add test to settings + make it use fluent easing