remove unused converters
MODIFY
WalletWasabi.Fluent/Controls/CurrencyEntryBox.axaml
WalletWasabi.Fluent/Controls/CurrencyEntryBox.axaml
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls;assembly=WalletWasabi.Fluent"
- xmlns:converters="using:WalletWasabi.Fluent.Converters">
+ xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls;assembly=WalletWasabi.Fluent">
<Design.PreviewWith>
<c:CurrencyEntryBox IsReadOnly="True" AmountBtc="1" ConversionCurrencyCode="USD" />
</Design.PreviewWith>
<Thickness x:Key="TextControlBorderThemeThickness">0,0,0,2</Thickness>
<Thickness x:Key="TextControlBorderThemeThicknessFocused">0,0,0,2</Thickness>
<Thickness x:Key="TextControlThemePadding">15,10,15,8</Thickness>
- <converters:ErrorSeverityColorConverter x:Key="ErrorSeverityColorConverter" />
- <converters:ErrorDescriptorToBorderColorConverter x:Key="ErrorDescriptorToBorderColorConverter" />
</Styles.Resources>
<Style Selector="c|CurrencyEntryBox">

DELETE
WalletWasabi.Fluent/Converters/ErrorDescriptorToBorderColorConverter.cs
-using Avalonia.Data.Converters;
-using Avalonia.Media;
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using WalletWasabi.Models;
-
-namespace WalletWasabi.Fluent.Converters
-{
- public class ErrorDescriptorToBorderColorConverter : IValueConverter
- {
- public object? Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var descriptors = ErrorDescriptors.Create();
-
- if (value is IEnumerable<object> rawObj)
- {
- foreach (var error in rawObj.OfType<ErrorDescriptor>())
- {
- descriptors.Add(error);
- }
- }
- else
- {
- return null;
- }
-
- return GetColorFromDescriptors(descriptors);
- }
-
- private SolidColorBrush? GetColorFromDescriptors(ErrorDescriptors descriptors)
- {
- if (!descriptors.Any())
- {
- return null;
- }
-
- var highPrioError = descriptors.OrderByDescending(p => p.Severity).FirstOrDefault();
-
- if (ErrorSeverityColorConverter.ErrorSeverityColors.TryGetValue(highPrioError.Severity, out var brush))
- {
- return brush;
- }
- else
- {
- return null;
- }
- }
-
- public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return null;
- }
- }
-}

DELETE
WalletWasabi.Fluent/Converters/ErrorSeverityColorConverter.cs
-using Avalonia.Data.Converters;
-using Avalonia.Media;
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using WalletWasabi.Models;
-
-namespace WalletWasabi.Fluent.Converters
-{
- public class ErrorSeverityColorConverter : IValueConverter
- {
- internal static Dictionary<ErrorSeverity, SolidColorBrush> ErrorSeverityColors = new()
- {
- { ErrorSeverity.Default, new SolidColorBrush(Colors.White) },
- { ErrorSeverity.Info, new SolidColorBrush(Colors.LightCyan) },
- { ErrorSeverity.Warning, new SolidColorBrush(Colors.Gold) },
- { ErrorSeverity.Error, new SolidColorBrush(Colors.IndianRed) }
- };
-
- public object? Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is ErrorSeverity severity)
- {
- if (ErrorSeverityColors.TryGetValue(severity, out var brush))
- {
- return brush;
- }
- }
- return null;
- }
-
- public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return null;
- }
- }
-}

MODIFY
WalletWasabi.Fluent/Styles/TextBox.axaml
WalletWasabi.Fluent/Styles/TextBox.axaml
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="using:WalletWasabi.Fluent.Behaviors"
xmlns:i="using:Avalonia.Xaml.Interactivity"
- xmlns:converters="using:WalletWasabi.Fluent.Converters"
xmlns:validation="clr-namespace:WalletWasabi.Fluent.Validation"
xmlns:conv="clr-namespace:WalletWasabi.Fluent.Converters">
<Styles.Resources>
<Thickness x:Key="TextControlBorderThemeThickness">0,0,0,2</Thickness>
<Thickness x:Key="TextControlBorderThemeThicknessFocused">0,0,0,2</Thickness>
<Thickness x:Key="TextControlThemePadding">15,10,15,8</Thickness>
- <converters:ErrorSeverityColorConverter x:Key="ErrorSeverityColorConverter" />
- <converters:ErrorDescriptorToBorderColorConverter x:Key="ErrorDescriptorToBorderColorConverter" />
</Styles.Resources>
<Style Selector="TextBox">

remove unused converters