misc: update converter namespaces and clean up code formatting.

This commit is contained in:
Zhang Dian
2025-09-17 20:17:48 +08:00
parent 0a84c79a15
commit 25d5e43781
15 changed files with 22 additions and 361 deletions

View File

@@ -4,14 +4,15 @@ using Avalonia.Data.Converters;
namespace Ursa.Themes.Semi.Converters;
public class NavMenuMarginConverter: IMultiValueConverter
public class NavMenuMarginConverter : IMultiValueConverter
{
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
{
if (values[0] is double indent && values[1] is int level && values[2] is bool b)
{
return b ? new Thickness() : new Thickness(indent * (level-1), 0, 0, 0);
return b ? new Thickness() : new Thickness(indent * (level - 1), 0, 0, 0);
}
return AvaloniaProperty.UnsetValue;
}
}