Skip to content

Commit

Permalink
Revert "fix(shadows): background theming issue"
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 authored Aug 23, 2023
1 parent 5199415 commit 4e462a1
Show file tree
Hide file tree
Showing 7 changed files with 352 additions and 233 deletions.
6 changes: 6 additions & 0 deletions src/Uno.Toolkit.Skia.WinUI/Controls/Shadows/Shadow.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
using System.ComponentModel;

#if IS_WINUI
using Microsoft.UI.Xaml;
#else
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#endif

namespace Uno.Toolkit.UI;

Expand Down
13 changes: 10 additions & 3 deletions src/Uno.Toolkit.Skia.WinUI/Controls/Shadows/ShadowCollection.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
using System;
using System.Collections.ObjectModel;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;

namespace Uno.Toolkit.UI;

public class ShadowCollection : ObservableCollection<Shadow> { }
public class ShadowCollection : ObservableCollection<Shadow>
{
public bool HasInnerShadow() => this.Any(s => s.IsInner);

public string ToKey(double width, double height, Windows.UI.Color? contentBackground)
=> string.Create(CultureInfo.InvariantCulture, $"w{width},h{height}") +
(contentBackground.HasValue ? $",cb{contentBackground.Value}:" : ":") +
string.Join("/", this.Select(x => x.ToKey()));
}
Loading

0 comments on commit 4e462a1

Please sign in to comment.