-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(shadows): revert double shadow impl
reverting: "6d09cf17 fix(shadows): background theming issue"
- Loading branch information
Showing
7 changed files
with
352 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
src/Uno.Toolkit.Skia.WinUI/Controls/Shadows/ShadowCollection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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())); | ||
} |
Oops, something went wrong.