Rename StatusBar => StatusIcon
MODIFY
WalletWasabi.Fluent.Desktop/Program.cs
WalletWasabi.Fluent.Desktop/Program.cs
@@ -166,7 +166,7 @@ public class Program
private static async Task TerminateApplicationAsync()
{
MainViewModel.Instance.ClearStacks();
- MainViewModel.Instance.StatusBar.Dispose();
+ MainViewModel.Instance.StatusIcon.Dispose();
Logger.LogSoftwareStopped("Wasabi GUI");
if (Global is { } global)

RENAME
WalletWasabi.Fluent/Converters/StatusBarStateVisibilityConverter.cs
WalletWasabi.Fluent/Converters/StatusIconStateVisibilityConverter.cs
@@ -5,17 +5,17 @@ using WalletWasabi.Fluent.Models;
namespace WalletWasabi.Fluent.Converters;
-public class StatusBarStateVisibilityConverter : IValueConverter
+public class StatusIconStateVisibilityConverter : IValueConverter
{
- public static readonly StatusBarStateVisibilityConverter Instance = new();
+ public static readonly StatusIconStateVisibilityConverter Instance = new();
- private StatusBarStateVisibilityConverter()
+ private StatusIconStateVisibilityConverter()
{
}
object IValueConverter.Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
- if (value is StatusBarState state && parameter is StatusBarState paramState)
+ if (value is StatusIconState state && parameter is StatusIconState paramState)
{
return state == paramState;
}

RENAME
WalletWasabi.Fluent/Models/StatusBarState.cs
WalletWasabi.Fluent/Models/StatusIconState.cs
namespace WalletWasabi.Fluent.Models;
-public enum StatusBarState
+public enum StatusIconState
{
Loading,
Ready,

MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -14,7 +14,7 @@ using WalletWasabi.Fluent.ViewModels.OpenDirectory;
using WalletWasabi.Fluent.ViewModels.SearchBar;
using WalletWasabi.Fluent.ViewModels.SearchBar.Sources;
using WalletWasabi.Fluent.ViewModels.Settings;
-using WalletWasabi.Fluent.ViewModels.StatusBar;
+using WalletWasabi.Fluent.ViewModels.StatusIcon;
using WalletWasabi.Fluent.ViewModels.TransactionBroadcasting;
using WalletWasabi.Fluent.ViewModels.Wallets;
using WalletWasabi.Logging;
@@ -33,7 +33,7 @@ public partial class MainViewModel : ViewModelBase
[AutoNotify] private DialogScreenViewModel _fullScreen;
[AutoNotify] private DialogScreenViewModel _compactDialogScreen;
[AutoNotify] private NavBarViewModel _navBar;
- [AutoNotify] private StatusBarViewModel _statusBar;
+ [AutoNotify] private StatusIconViewModel _statusIcon;
[AutoNotify] private string _title = "Wasabi Wallet";
[AutoNotify] private WindowState _windowState;
[AutoNotify] private bool _isOobeBackgroundVisible;
@@ -68,7 +68,7 @@ public partial class MainViewModel : ViewModelBase
_isDialogScreenEnabled = true;
_isFullScreenEnabled = true;
- _statusBar = new StatusBarViewModel();
+ _statusIcon = new StatusIconViewModel();
UiServices.Initialize();
@@ -214,7 +214,7 @@ public partial class MainViewModel : ViewModelBase
public void Initialize()
{
- StatusBar.Initialize();
+ StatusIcon.Initialize();
if (Services.Config.Network != Network.Main)
{

RENAME
WalletWasabi.Fluent/ViewModels/StatusBar/StatusBarViewModel.cs
WalletWasabi.Fluent/ViewModels/StatusIcon/StatusIconViewModel.cs
@@ -12,11 +12,11 @@ using WalletWasabi.Helpers;
using WalletWasabi.Models;
using WalletWasabi.Services;
-namespace WalletWasabi.Fluent.ViewModels.StatusBar;
+namespace WalletWasabi.Fluent.ViewModels.StatusIcon;
-public partial class StatusBarViewModel : IDisposable
+public partial class StatusIconViewModel : IDisposable
{
- [AutoNotify] private StatusBarState _currentState;
+ [AutoNotify] private StatusIconState _currentState;
[AutoNotify] private TorStatus _torStatus;
[AutoNotify] private BackendStatus _backendStatus;
[AutoNotify] private RpcStatus? _bitcoinCoreStatus;
@@ -26,16 +26,16 @@ public partial class StatusBarViewModel : IDisposable
[AutoNotify] private bool _isConnectionIssueDetected;
[AutoNotify] private string? _versionText;
- public StatusBarViewModel()
+ public StatusIconViewModel()
{
UseTor = Services.Config.UseTor; // Do not make it dynamic, because if you change this config settings only next time will it activate.
TorStatus = UseTor ? Services.Synchronizer.TorStatus : TorStatus.TurnedOff;
UseBitcoinCore = Services.Config.StartLocalBitcoinCoreOnStartup;
UpdateCommand = ReactiveCommand.CreateFromTask(async () => await IoHelpers.OpenBrowserAsync("https://wasabiwallet.io/#download"));
- AskMeLaterCommand = ReactiveCommand.Create(() => UpdateAvailable = false);
+ AskMeLaterCommand = ReactiveCommand.Create<bool>(() => UpdateAvailable = false);
- this.WhenAnyValue(
+ this.WhenAnyValue<StatusIconViewModel, TorStatus, BackendStatus, int, RpcStatus?, bool, bool, bool>(
x => x.TorStatus,
x => x.BackendStatus,
x => x.Peers,
@@ -52,7 +52,7 @@ public partial class StatusBarViewModel : IDisposable
IsConnectionIssueDetected = false;
}
- SetStatusBarState();
+ SetStatusIconState();
});
}
@@ -68,23 +68,23 @@ public partial class StatusBarViewModel : IDisposable
public string BitcoinCoreName => Constants.BuiltinBitcoinNodeName;
- private void SetStatusBarState()
+ private void SetStatusIconState()
{
if (IsConnectionIssueDetected)
{
- CurrentState = StatusBarState.ConnectionIssueDetected;
+ CurrentState = StatusIconState.ConnectionIssueDetected;
return;
}
if (CriticalUpdateAvailable)
{
- CurrentState = StatusBarState.CriticalUpdateAvailable;
+ CurrentState = StatusIconState.CriticalUpdateAvailable;
return;
}
if (UpdateAvailable)
{
- CurrentState = StatusBarState.UpdateAvailable;
+ CurrentState = StatusIconState.UpdateAvailable;
return;
}
@@ -94,11 +94,11 @@ public partial class StatusBarViewModel : IDisposable
if (torConnected && BackendStatus == BackendStatus.Connected && p2pConnected)
{
- CurrentState = StatusBarState.Ready;
+ CurrentState = StatusIconState.Ready;
return;
}
- CurrentState = StatusBarState.Loading;
+ CurrentState = StatusIconState.Loading;
}
public void Initialize()

MODIFY
WalletWasabi.Fluent/Views/Shell/MainView.axaml
WalletWasabi.Fluent/Views/Shell/MainView.axaml
x:DataType="viewModels:MainViewModel"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:shell="clr-namespace:WalletWasabi.Fluent.Views.Shell"
- xmlns:statusBar="clr-namespace:WalletWasabi.Fluent.Views.StatusBar"
+ xmlns:statusIcon="clr-namespace:WalletWasabi.Fluent.Views.StatusIcon"
d:DesignWidth="1000" d:DesignHeight="1000"
x:CompileBindings="True">
</DockPanel>
<Border CornerRadius="10 0 0 0" BoxShadow="inset 0 0 5 0 #000000" ClipToBounds="True"
IsHitTestVisible="False" Margin="0 0 -5 -5" />
- <statusBar:StatusBar Margin="15" Foreground="{DynamicResource AcrylicTrimForeground}" DataContext="{Binding StatusBar}" HorizontalAlignment="Right" VerticalAlignment="Bottom" />
+ <statusIcon:StatusIcon Margin="15" Foreground="{DynamicResource AcrylicTrimForeground}" DataContext="{Binding StatusIcon}" HorizontalAlignment="Right" VerticalAlignment="Bottom" />
</Panel>
</Border>
</DockPanel>

MODIFY
WalletWasabi.Fluent/Views/Shell/TitleBarView.axaml
WalletWasabi.Fluent/Views/Shell/TitleBarView.axaml
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ext="using:WalletWasabi.Fluent.Helpers"
- xmlns:statusBar="clr-namespace:WalletWasabi.Fluent.Views.StatusBar"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:searchBar="clr-namespace:WalletWasabi.Fluent.Views.SearchBar"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

RENAME
WalletWasabi.Fluent/Views/StatusBar/StatusBar.axaml
WalletWasabi.Fluent/Views/StatusIcon/StatusIcon.axaml
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:behaviors="clr-namespace:WalletWasabi.Fluent.Behaviors"
xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls"
- xmlns:statusBar="clr-namespace:WalletWasabi.Fluent.ViewModels.StatusBar"
xmlns:converters="using:WalletWasabi.Fluent.Converters"
xmlns:models="clr-namespace:WalletWasabi.Fluent.Models"
- xmlns:sb="clr-namespace:WalletWasabi.Fluent.Views.StatusBar"
+ xmlns:sb="clr-namespace:WalletWasabi.Fluent.Views.StatusIcon"
+ xmlns:statusIcon="clr-namespace:WalletWasabi.Fluent.ViewModels.StatusIcon"
mc:Ignorable="d" d:DesignWidth="671" d:DesignHeight="32"
- x:DataType="statusBar:StatusBarViewModel"
+ x:DataType="statusIcon:StatusIconViewModel"
x:CompileBindings="True"
Foreground="{DynamicResource AcrylicTrimForeground}"
- x:Class="WalletWasabi.Fluent.Views.StatusBar.StatusBar">
+ x:Class="WalletWasabi.Fluent.Views.StatusIcon.StatusIcon">
<UserControl.Styles>
<Style Selector="PathIcon">
</Style>
<Style Selector="AccessText">
- <Setter Property="Foreground" Value="{Binding $parent[sb:StatusBar].Foreground}" />
+ <Setter Property="Foreground" Value="{Binding $parent[sb:StatusIcon].Foreground}" />
</Style>
<Style Selector="PathIcon">
- <Setter Property="Foreground" Value="{Binding $parent[sb:StatusBar].Foreground}" />
+ <Setter Property="Foreground" Value="{Binding $parent[sb:StatusIcon].Foreground}" />
</Style>
</UserControl.Styles>
<!-- Warning message TODO: use InfoMessage control-->
<DockPanel
- IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusBarStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusBarState.ConnectionIssueDetected}}">
+ IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusIconStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusIconState.ConnectionIssueDetected}}">
<PathIcon Data="{StaticResource info_regular}"
DockPanel.Dock="Top"
HorizontalAlignment="Center"
<!--Update available-->
<PathIcon
- IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusBarStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusBarState.UpdateAvailable}}"
+ IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusIconStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusIconState.UpdateAvailable}}"
Data="{StaticResource arrow_clockwise_with_elipse}"
Foreground="Goldenrod" />
<!--Critical update available-->
<PathIcon
- IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusBarStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusBarState.CriticalUpdateAvailable}}"
+ IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusIconStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusIconState.CriticalUpdateAvailable}}"
Data="{StaticResource critical_update}"
Foreground="{DynamicResource SystemErrorTextColor}" />
<!-- Ready -->
<PathIcon
- IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusBarStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusBarState.Ready}}"
+ IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusIconStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusIconState.Ready}}"
Data="{StaticResource checkmark_circle_filled}" />
<!-- Connection issue -->
<PathIcon
- IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusBarStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusBarState.ConnectionIssueDetected}}"
+ IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusIconStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusIconState.ConnectionIssueDetected}}"
Data="{StaticResource warning_filled}"
Foreground="Gold"
VerticalAlignment="Center" HorizontalAlignment="Right" />
<!-- Loading -->
<PathIcon
- IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusBarStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusBarState.Loading}}"
+ IsVisible="{Binding CurrentState, Converter={x:Static converters:StatusIconStateVisibilityConverter.Instance}, ConverterParameter={x:Static models:StatusIconState.Loading}}"
Data="{StaticResource arrow_sync_regular}"
Classes.rotate="{Binding $self.IsVisible}" />

RENAME
WalletWasabi.Fluent/Views/StatusBar/StatusBar.axaml.cs
WalletWasabi.Fluent/Views/StatusIcon/StatusIcon.axaml.cs
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
-namespace WalletWasabi.Fluent.Views.StatusBar;
+namespace WalletWasabi.Fluent.Views.StatusIcon;
-public class StatusBar : UserControl
+public class StatusIcon : UserControl
{
- public StatusBar()
+ public StatusIcon()
{
InitializeComponent();
}

MODIFY
WalletWasabi.Fluent/WalletWasabi.Fluent.csproj
WalletWasabi.Fluent/WalletWasabi.Fluent.csproj
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>
+
+ <ItemGroup>
+ <Compile Update="Views\StatusIcon\StatusIcon.axaml.cs">
+ <DependentUpon>StatusIcon.axaml</DependentUpon>
+ </Compile>
+ </ItemGroup>
</Project>

Rename StatusBar => StatusIcon