[skip ci] Fix design mode
MODIFY
WalletWasabi.Gui/Controls/SortingArrow.cs
WalletWasabi.Gui/Controls/SortingArrow.cs
@@ -21,13 +21,14 @@ namespace WalletWasabi.Gui.Controls
Increasing,
Decreasing
}
+
public class SortingArrow : Button, IStyleable
{
Type IStyleable.StyleKey => typeof(Button);
- static readonly Geometry UpArrow = Geometry.Parse("M13.889,11.611c-0.17,0.17-0.443,0.17-0.612,0l-3.189-3.187l-3.363,3.36c-0.171,0.171-0.441,0.171-0.612,0c-0.172-0.169-0.172-0.443,0-0.611l3.667-3.669c0.17-0.17,0.445-0.172,0.614,0l3.496,3.493C14.058,11.167,14.061,11.443,13.889,11.611 M18.25,10c0,4.558-3.693,8.25-8.25,8.25c-4.557,0-8.25-3.692-8.25-8.25c0-4.557,3.693-8.25,8.25-8.25C14.557,1.75,18.25,5.443,18.25,10 M17.383,10c0-4.07-3.312-7.382-7.383-7.382S2.618,5.93,2.618,10S5.93,17.381,10,17.381S17.383,14.07,17.383,10");
- static readonly Geometry DownArrow = Geometry.Parse("M13.962,8.885l-3.736,3.739c-0.086,0.086-0.201,0.13-0.314,0.13S9.686,12.71,9.6,12.624l-3.562-3.56C5.863,8.892,5.863,8.611,6.036,8.438c0.175-0.173,0.454-0.173,0.626,0l3.25,3.247l3.426-3.424c0.173-0.172,0.451-0.172,0.624,0C14.137,8.434,14.137,8.712,13.962,8.885 M18.406,10c0,4.644-3.763,8.406-8.406,8.406S1.594,14.644,1.594,10S5.356,1.594,10,1.594S18.406,5.356,18.406,10 M17.521,10c0-4.148-3.373-7.521-7.521-7.521c-4.148,0-7.521,3.374-7.521,7.521c0,4.147,3.374,7.521,7.521,7.521C14.148,17.521,17.521,14.147,17.521,10");
- Path _iconPath;
- TextBlock _textBox;
+ private static readonly Geometry UpArrow = Geometry.Parse("M13.889,11.611c-0.17,0.17-0.443,0.17-0.612,0l-3.189-3.187l-3.363,3.36c-0.171,0.171-0.441,0.171-0.612,0c-0.172-0.169-0.172-0.443,0-0.611l3.667-3.669c0.17-0.17,0.445-0.172,0.614,0l3.496,3.493C14.058,11.167,14.061,11.443,13.889,11.611 M18.25,10c0,4.558-3.693,8.25-8.25,8.25c-4.557,0-8.25-3.692-8.25-8.25c0-4.557,3.693-8.25,8.25-8.25C14.557,1.75,18.25,5.443,18.25,10 M17.383,10c0-4.07-3.312-7.382-7.383-7.382S2.618,5.93,2.618,10S5.93,17.381,10,17.381S17.383,14.07,17.383,10");
+ private static readonly Geometry DownArrow = Geometry.Parse("M13.962,8.885l-3.736,3.739c-0.086,0.086-0.201,0.13-0.314,0.13S9.686,12.71,9.6,12.624l-3.562-3.56C5.863,8.892,5.863,8.611,6.036,8.438c0.175-0.173,0.454-0.173,0.626,0l3.25,3.247l3.426-3.424c0.173-0.172,0.451-0.172,0.624,0C14.137,8.434,14.137,8.712,13.962,8.885 M18.406,10c0,4.644-3.763,8.406-8.406,8.406S1.594,14.644,1.594,10S5.356,1.594,10,1.594S18.406,5.356,18.406,10 M17.521,10c0-4.148-3.373-7.521-7.521-7.521c-4.148,0-7.521,3.374-7.521,7.521c0,4.147,3.374,7.521,7.521,7.521C14.148,17.521,17.521,14.147,17.521,10");
+ private Path _iconPath;
+ private TextBlock _textBox;
public SortingArrow()
{
@@ -35,7 +36,7 @@ namespace WalletWasabi.Gui.Controls
_iconPath = new Path()
{
Stretch = Stretch.Fill,
- Stroke = (IBrush)Application.Current.Resources["ApplicationAccentForegroundBrush"],
+ Stroke = Design.IsDesignMode ? Brushes.White : (IBrush)Application.Current.Resources["ApplicationAccentForegroundBrush"],
StrokeThickness = 0.8,
Width = 10,
Height = 10,
@@ -82,16 +83,18 @@ namespace WalletWasabi.Gui.Controls
Click += SortingArrow_Click;
}
- void SortingArrow_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
+ private void SortingArrow_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
{
switch (SortDirection)
{
case SortOrder.None:
SortDirection = SortOrder.Increasing;
break;
+
case SortOrder.Increasing:
SortDirection = SortOrder.Decreasing;
break;
+
case SortOrder.Decreasing:
SortDirection = SortOrder.Increasing;
break;
@@ -131,9 +134,11 @@ AvaloniaProperty.Register<SortingArrow, string>(nameof(Text), defaultBindingMode
case SortOrder.None:
_iconPath.Data = Geometry.Parse("");
break;
+
case SortOrder.Increasing:
_iconPath.Data = DownArrow;
break;
+
case SortOrder.Decreasing:
_iconPath.Data = UpArrow;
break;

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
<controls:SortingArrow Grid.Column="4" Text="Privacy" SortDirection="{Binding PrivacySortDirection}" />
<controls:SortingArrow Grid.Column="5" Text="History" SortDirection="{Binding HistorySortDirection}" />
-
</Grid>
<StackPanel Margin="0 10 0 0" Spacing="10" DockPanel.Dock="Bottom" Orientation="Horizontal">
<CheckBox Content = "Select All" IsThreeState="True" IsChecked = "{Binding SelectAllCheckBoxState}" Command="{Binding SelectAllCheckBoxCommand}" ToolTip.Tip="Select All" />

[skip ci] Fix design mode