Improve aeshetics
MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
using System.Linq;
using System.Reactive.Concurrency;
-using NBitcoin;
-using ReactiveUI;
using System.Reactive.Linq;
using Avalonia.Controls;
-using Avalonia.Threading;
+using NBitcoin;
+using ReactiveUI;
using WalletWasabi.Fluent.ViewModels.AddWallet;
using WalletWasabi.Fluent.ViewModels.Dialogs.Base;
+using WalletWasabi.Fluent.ViewModels.HelpAndSupport;
using WalletWasabi.Fluent.ViewModels.NavBar;
using WalletWasabi.Fluent.ViewModels.Navigation;
-using WalletWasabi.Fluent.ViewModels.Search;
-using WalletWasabi.Fluent.ViewModels.Settings;
-using WalletWasabi.Fluent.ViewModels.TransactionBroadcasting;
-using WalletWasabi.Fluent.ViewModels.HelpAndSupport;
using WalletWasabi.Fluent.ViewModels.OpenDirectory;
+using WalletWasabi.Fluent.ViewModels.Search;
using WalletWasabi.Fluent.ViewModels.SearchBar;
-using WalletWasabi.Fluent.ViewModels.SearchBarTextPart;
-using WalletWasabi.Logging;
+using WalletWasabi.Fluent.ViewModels.Settings;
using WalletWasabi.Fluent.ViewModels.StatusBar;
+using WalletWasabi.Fluent.ViewModels.TransactionBroadcasting;
using WalletWasabi.Fluent.ViewModels.Wallets;
-using WalletWasabi.WabiSabi.Client;
-using Avalonia;
+using WalletWasabi.Logging;
namespace WalletWasabi.Fluent.ViewModels;

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/SearchBarDesignViewModel.cs
WalletWasabi.Fluent/ViewModels/SearchBar/SearchBarDesignViewModel.cs
@@ -4,7 +4,7 @@ using System.Reactive.Linq;
using DynamicData;
using ReactiveUI;
-namespace WalletWasabi.Fluent.ViewModels.SearchBarTextPart;
+namespace WalletWasabi.Fluent.ViewModels.SearchBar;
public class SearchBarDesignViewModel : ReactiveObject
{

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/SearchBarViewModel.cs
WalletWasabi.Fluent/ViewModels/SearchBar/SearchBarViewModel.cs
@@ -4,7 +4,7 @@ using System.Reactive.Linq;
using DynamicData;
using ReactiveUI;
-namespace WalletWasabi.Fluent.ViewModels.SearchBarTextPart;
+namespace WalletWasabi.Fluent.ViewModels.SearchBar;
public class SearchBarViewModel : ReactiveObject
{

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItem.cs
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItem.cs
@@ -2,7 +2,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Windows.Input;
-namespace WalletWasabi.Fluent.ViewModels.SearchBarTextPart;
+namespace WalletWasabi.Fluent.ViewModels.SearchBar;
public class SearchItem
{
@@ -20,7 +20,7 @@ public class SearchItem
public string Name { get; }
public string Description { get; }
public ComposedKey Key => new(Name);
- public string Icon { get; set; }
+ public string? Icon { get; set; }
public string Category { get; }
public IEnumerable<string> Keywords { get; }
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItemGroup.cs
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItemGroup.cs
@@ -3,7 +3,7 @@ using System.Reactive.Linq;
using DynamicData;
using ReactiveUI;
-namespace WalletWasabi.Fluent.ViewModels.SearchBarTextPart;
+namespace WalletWasabi.Fluent.ViewModels.SearchBar;
public class SearchItemGroup
{

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItemProvider.cs
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItemProvider.cs
@@ -3,7 +3,6 @@ using System.Reactive;
using System.Reactive.Linq;
using ReactiveUI;
using WalletWasabi.Fluent.ViewModels.Navigation;
-using WalletWasabi.Fluent.ViewModels.SearchBarTextPart;
namespace WalletWasabi.Fluent.ViewModels.SearchBar;

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/ValueObject.cs
WalletWasabi.Fluent/ViewModels/SearchBar/ValueObject.cs
using System.Collections.Generic;
using System.Linq;
-namespace WalletWasabi.Fluent.ViewModels.SearchBarTextPart
-{
+namespace WalletWasabi.Fluent.ViewModels.SearchBar;
+
[Serializable]
public abstract class ValueObject : IComparable, IComparable<ValueObject>
{
@@ -137,4 +137,3 @@ namespace WalletWasabi.Fluent.ViewModels.SearchBarTextPart
return type;
}
}
\ No newline at end of file
-}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/MainView.axaml
WalletWasabi.Fluent/Views/MainView.axaml
</Panel>
</Border>
- <searchBar:SearchBar DataContext="{Binding SearchBar}" Grid.RowSpan="2" Grid.ColumnSpan="3" />
+ <searchBar:SearchBar DataContext="{Binding SearchBar}" Margin="0 15 0 0" Grid.Row="0" Grid.RowSpan="2" Grid.ColumnSpan="3"
+ Grid.Column="0" />
</Grid>
</Panel>

MODIFY
WalletWasabi.Fluent/Views/SearchBar/SearchBar.axaml
WalletWasabi.Fluent/Views/SearchBar/SearchBar.axaml
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:s="clr-namespace:WalletWasabi.Fluent.Views.SearchBar"
- xmlns:searchBarTextPart="clr-namespace:WalletWasabi.Fluent.ViewModels.SearchBarTextPart"
mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="800"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
- xmlns:ia="clr-namespace:Avalonia.Xaml.Interactions.Core;assembly=Avalonia.Xaml.Interactions"
- xmlns:ic="clr-namespace:Avalonia.Xaml.Interactions.Custom;assembly=Avalonia.Xaml.Interactions"
xmlns:behaviors="clr-namespace:WalletWasabi.Fluent.Behaviors"
+ xmlns:searchBar="clr-namespace:WalletWasabi.Fluent.ViewModels.SearchBar"
+ x:CompileBindings="True"
+ x:DataType="searchBar:SearchBarViewModel"
x:Class="WalletWasabi.Fluent.Views.SearchBar.SearchBar">
<UserControl.Resources>
- <Thickness x:Key="TextControlBorderThemeThickness">1</Thickness>
<Thickness x:Key="TextControlBorderThemeThicknessFocused">1</Thickness>
- <Thickness x:Key="TextControlThemePadding">15,10,15,8</Thickness>
</UserControl.Resources>
<UserControl.Styles>
<Setter Property="BorderThickness" Value="1 1 1 1" />
<Setter Property="CornerRadius" Value="4" />
<Setter Property="Margin" Value="0" />
- <Setter Property="FontSize" Value="12"></Setter>
- <Setter Property="Padding" Value="6 3"></Setter>
- <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
- <Setter Property="MinHeight" Value="8"></Setter>
+ <Setter Property="FontSize" Value="12" />
+ <Setter Property="Padding" Value="6 3" />
+ <Setter Property="VerticalContentAlignment" Value="Center" />
+ <Setter Property="MinHeight" Value="8" />
</Style>
<Style Selector="TextBox#SearchBox /template/ Border#PART_BorderElement">
</Style>
<Style Selector="TextBox#SearchBox /template/ DataValidationErrors">
- <Setter Property="IsVisible" Value="False"></Setter>
+ <Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="TextBox:pointerover">
<Setter Property="Background" Value="Transparent" />
</Style>
- <Style Selector="TextBox:pointerover /template/ TextBlock#PART_Watermark, TextBox:pointerover /template/ TextBlock#PART_FloatingWatermark">
+ <Style
+ Selector="TextBox:pointerover /template/ TextBlock#PART_Watermark, TextBox:pointerover /template/ TextBlock#PART_FloatingWatermark">
<Setter Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundPointerOver}" />
</Style>
<Setter Property="Cursor" Value="Arrow" />
</Style>
- <Style Selector="TextBox:focus /template/ TextBlock#PART_Watermark, TextBox:focus /template/ TextBlock#PART_FloatingWatermark">
+ <Style
+ Selector="TextBox:focus /template/ TextBlock#PART_Watermark, TextBox:focus /template/ TextBlock#PART_FloatingWatermark">
<Setter Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundFocused}" />
</Style>
</Style>
</UserControl.Styles>
-
-
<i:Interaction.Behaviors>
<behaviors:SearchBarBehavior SearchBox="SearchBox" SearchPanel="SearchBarDropdown" />
</i:Interaction.Behaviors>
<Design.DataContext>
- <searchBarTextPart:SearchBarDesignViewModel />
+ <searchBar:SearchBarDesignViewModel />
</Design.DataContext>
- <StackPanel Margin="400 0" VerticalAlignment="Top">
- <TextBox x:Name="SearchBox" Watermark="Search settings / advanced features" Text="{Binding SearchText, Mode=TwoWay}" VerticalAlignment="Top" />
-
- <s:SearchBarDropdown x:Name="SearchBarDropdown" IsVisible="False" HorizontalAlignment="Left" MinWidth="400" MaxHeight="500" />
+ <StackPanel Margin="300 0" VerticalAlignment="Top">
+ <TextBox x:Name="SearchBox" Watermark="Search settings / advanced features" HorizontalAlignment="Left"
+ Text="{Binding SearchText, Mode=TwoWay}" MaxWidth="300" VerticalAlignment="Top" />
+ <s:SearchBarDropdown x:Name="SearchBarDropdown" IsVisible="False" HorizontalAlignment="Left" MinWidth="400"
+ MaxHeight="500" />
</StackPanel>
+
</UserControl>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/SearchBar/SearchBarDropdown.axaml
WalletWasabi.Fluent/Views/SearchBar/SearchBarDropdown.axaml
xmlns:ia="clr-namespace:Avalonia.Xaml.Interactions.Core;assembly=Avalonia.Xaml.Interactions"
xmlns:ic="clr-namespace:Avalonia.Xaml.Interactions.Custom;assembly=Avalonia.Xaml.Interactions"
x:Class="WalletWasabi.Fluent.Views.SearchBar.SearchBarDropdown"
- xmlns:searchBar="clr-namespace:WalletWasabi.Fluent.ViewModels.SearchBarTextPart"
- x:CompileBindings="False"
+ x:CompileBindings="True"
x:Name="UserControl"
- x:DataType="searchBar:SearchBarViewModel"
+ x:DataType="sb:SearchBarViewModel"
xmlns:conv="clr-namespace:WalletWasabi.Fluent.Converters"
- xmlns:b="clr-namespace:WalletWasabi.Fluent.Behaviors"
+ xmlns:sb="clr-namespace:WalletWasabi.Fluent.ViewModels.SearchBar"
Background="{StaticResource SystemBaseLowColor}">
<Design.DataContext>
- <searchBar:SearchBarDesignViewModel />
+ <sb:SearchBarDesignViewModel />
</Design.DataContext>
<UserControl.Styles>
<ScrollViewer>
<ItemsControl Items="{Binding Groups}">
<ItemsControl.ItemTemplate>
- <DataTemplate DataType="{x:Type searchBar:SearchItemGroup}">
+ <DataTemplate DataType="{x:Type sb:SearchItemGroup}">
<DockPanel Margin="10 ">
<TextBlock Text="{Binding Title}" DockPanel.Dock="Top" />
<ListBox x:Name="ListBox" Items="{Binding Items}">
<ListBox.ItemTemplate>
- <DataTemplate x:DataType="searchBar:SearchItem">
+ <DataTemplate x:DataType="sb:SearchItem">
<Panel Background="Transparent">
<DockPanel Background="Transparent" Margin="10">
</DataTemplate>
</ListBox.ItemTemplate>
- <!--<i:Interaction.Behaviors>
- <searchBar:AutoSelectFirstItemBehavior />
- </i:Interaction.Behaviors>-->
-
</ListBox>
</DockPanel>
</DataTemplate>

Improve aeshetics