Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Aug 24, 2023
1 parent f633ff0 commit 44e1ba3
Show file tree
Hide file tree
Showing 8 changed files with 449 additions and 479 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class HexToColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
return value.ToString();
return value?.ToString();
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
Expand Down
13 changes: 0 additions & 13 deletions src/Uno.Toolkit.Skia.WinUI/Controls/Shadows/Shadow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,6 @@ public double Spread

public event PropertyChangedEventHandler? PropertyChanged;

internal static bool IsShadowProperty(string propertyName)
{
return propertyName == nameof(OffsetX) || propertyName == nameof(OffsetY) ||
propertyName == nameof(IsInner) ||
propertyName == nameof(Color) ||
propertyName == nameof(Opacity) ||
propertyName == nameof(BlurRadius) ||
propertyName == nameof(Spread);
}

internal static bool IsShadowSizeProperty(string propertyName)
{
return propertyName == nameof(OffsetX) || propertyName == nameof(OffsetY) ||
Expand All @@ -174,9 +164,6 @@ private static void OnPropertyChanged(object dependencyObject, string propertyNa
public override string ToString() =>
$"{{ IsInner: {{{IsInner}}}, Offset: {{{OffsetX}, {OffsetY}}} Color: {{A={Color.A}, R={Color.R}, G={Color.G}, B={Color.B}}}, Opacity: {Opacity}, BlurRadius: {BlurRadius}, Spread: {Spread} }}";

public string ToKey() =>
string.Join(",", IsInner, OffsetX, OffsetY, Color.ToString(), Opacity, BlurRadius, Spread);

public Shadow Clone()
{
return new Shadow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ namespace Uno.Toolkit.UI;

public class ShadowCollection : ObservableCollection<Shadow>
{
public string ToKey() => string.Join("/", this.Select(x => x.ToKey()));
}
Loading

0 comments on commit 44e1ba3

Please sign in to comment.