Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed Nov 20, 2024
1 parent 1af9f03 commit f6e7f54
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
9 changes: 6 additions & 3 deletions src/Uno.UI/UI/ColorHelper.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System;
// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever)
#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT
using System;
using System.ComponentModel;
using Uno.Extensions;
using WindowsColor = Windows/*Intentional space for WinUI upgrade tool*/.UI.Color;

#if HAS_UNO_WINUI && IS_UNO_UI_PROJECT
#if IS_UNO_UI_PROJECT
namespace Microsoft.UI.Text;
#else
namespace Windows.UI.Text;
Expand Down Expand Up @@ -357,7 +359,7 @@ public static WindowsColor FromArgb(byte a, byte r, byte g, byte b)
];
#endregion

private unsafe static uint GetColorNameResourceId(WindowsColor color)
private static uint GetColorNameResourceId(WindowsColor color)
{
var hsl = color.ToHsl();
double h = hsl.H * 255.0;
Expand Down Expand Up @@ -428,3 +430,4 @@ private unsafe static uint GetColorNameResourceId(WindowsColor color)
}
}
}
#endif
7 changes: 5 additions & 2 deletions src/Uno.UI/UI/Colors.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System;
// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever)
#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT
using System;
using System.Collections.Generic;
using System.Text;

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

#if HAS_UNO_WINUI && IS_UNO_UI_PROJECT
#if IS_UNO_UI_PROJECT
namespace Microsoft.UI
#else
namespace Windows.UI
Expand Down Expand Up @@ -564,3 +566,4 @@ private static byte ToByte(char c)
public static Color YellowGreen => _yellowGreen ??= FromInteger(unchecked((int)0xFF9ACD32));
}
}
#endif
7 changes: 5 additions & 2 deletions src/Uno.UI/UI/Text/FontWeights.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever)
#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT
using System;
using System.Collections.Generic;
using System.Text;

#if HAS_UNO_WINUI && IS_UNO_UI_PROJECT
#if IS_UNO_UI_PROJECT
using Windows.UI.Text;
namespace Microsoft.UI.Text
#else
Expand Down Expand Up @@ -47,3 +49,4 @@ partial class FontWeights
public static FontWeight UltraBlack => _extraBlack ??= new FontWeight(950);
}
}
#endif

0 comments on commit f6e7f54

Please sign in to comment.