Skip to content

Commit

Permalink
chore: remove Colors and FontWeights from Uno.UWP
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed Nov 19, 2024
1 parent 3389d6a commit 5c7ae5f
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 617 deletions.
12 changes: 7 additions & 5 deletions src/Uno.UI/UI/Colors.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.UI;

using Color = global::Windows/*Intentional space for WinUI upgrade tool*/.UI.Color;

#if HAS_UNO_WINUI && IS_UNO_UI_PROJECT
namespace Microsoft.UI
#else
namespace Windows.UI
#endif
{
#if HAS_UNO_WINUI && !IS_UNO_UI_PROJECT
internal
Expand Down Expand Up @@ -210,7 +213,7 @@ public static Color FromARGB(string colorCode)
else
{
len = colorCode.Length;
// skip a starting `#` if present
// skip a starting `#` if present
offset = (len > 0 && colorCode[0] == '#' ? 1 : 0);
len -= offset;
}
Expand Down Expand Up @@ -250,10 +253,9 @@ public static Color FromARGB(string colorCode)
}
else
{
r = 0xFF;
g = 0x0;
b = 0x0;
throw new ArgumentException($"Cannot parse color '{colorCode}'.");
}

return new Color(a, r, g, b);
}

Expand Down
Loading

0 comments on commit 5c7ae5f

Please sign in to comment.