Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge legacy branch #775

Merged
merged 9 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
Padding="10"
Height="220"
Width="220">
<utu:ShadowContainer x:Name="shadowContainer">
<utu:ShadowContainer x:Name="shadowContainer"
Background="Green">
<Border Width="200"
Height="200"
x:Name="border"
Background="Green" />
x:Name="border" />
</utu:ShadowContainer>
</Border>
</StackPanel>
Expand Down
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
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ItemGroup>
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.7.1" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.1.0" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.1.5" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
<PackageVersion Include="SkiaSharp" Version="2.88.5" />
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.5" />
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 @@ -7,10 +7,4 @@ namespace Uno.Toolkit.UI;

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

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