Skip to content

Commit

Permalink
chore: improved logic
Browse files Browse the repository at this point in the history
  • Loading branch information
pictos committed Mar 15, 2023
1 parent dc7c8e9 commit 2765bff
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/Resizetizer/src/GeneratePackageAppxManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,17 @@ void UpdateManifest(XDocument appx)
{
var xname = "BackgroundColor";
var attr = visual.Attribute(xname);
if (attr is null && splashInfo?.Color is not null)
{
visual.SetAttributeValue(xname, Utils.SkiaColorWithoutAlpha(splashInfo.Color));
}
else if (attr is null || string.IsNullOrEmpty(attr.Value))

if (attr is null || string.IsNullOrEmpty(attr.Value))
{
visual.SetAttributeValue(xname, "transparent");
if (splashInfo?.Color is not null)
{
visual.SetAttributeValue(xname, Utils.SkiaColorWithoutAlpha(splashInfo.Color));
}
else
{
visual.SetAttributeValue(xname, "transparent");
}
}
}

Expand Down

0 comments on commit 2765bff

Please sign in to comment.