Skip to content

Commit

Permalink
Upgrade Uno to 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
davidxuang committed Oct 28, 2024
1 parent 5d2e2ff commit 21c6a52
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 55 deletions.
5 changes: 2 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
<ItemGroup>
<PackageVersion Include="Avalonia" Version="11.0.0" />
<PackageVersion Include="FluentAvaloniaUI" Version="2.0.0" />
<PackageVersion Include="IgnoresAccessChecksToGenerator" Version="0.7.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Maui.Controls" Version="8.0.3" />
<PackageVersion Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.3" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.2.221109.1" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.1" />
<PackageVersion Include="Nullable" Version="1.3.1" />
<PackageVersion Include="Uno.UI" Version="5.0.19" />
<PackageVersion Include="Uno.WinUI" Version="5.0.19" />
<PackageVersion Include="Uno.UI" Version="5.4.22" />
<PackageVersion Include="Uno.WinUI" Version="5.4.22" />
</ItemGroup>
</Project>
5 changes: 0 additions & 5 deletions FluentIcons.Uwp/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ public static class Extensions
{
public static Application UseSegoeMetrics(this Application app)
{
#if !HAS_UNO
SymbolIcon.UseSegoeMetricsDefaultValue = true;
#else
SymbolIcon.UseSegoeMetricsProperty.GetMetadata(typeof(SymbolIcon)).DefaultValue = true;
SymbolIconSource.UseSegoeMetricsProperty.GetMetadata(typeof(SymbolIconSource)).DefaultValue = true;
#endif
return app;
}
}
8 changes: 1 addition & 7 deletions FluentIcons.Uwp/FluentIcons.Uwp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) or '$(EnableWindowsTargeting)' == 'true'">
$(TargetFrameworks);uap10.0.17763.0
</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst;net7.0-macos</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-macos</TargetFrameworks>
<Description>FluentUI System Icons control library for UWP.</Description>
<PackageTags>$(PackageTags);UWP</PackageTags>
<RootNamespace>FluentIcons.Uwp</RootNamespace>
<IsPackable>true</IsPackable>
<IsPublishable>true</IsPublishable>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
</PropertyGroup>

<Choose>
Expand All @@ -25,16 +24,11 @@
</When>

<Otherwise>
<ItemGroup>
<InternalsAssemblyName Include="Uno.UI" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FluentIcons.Uno\FluentIcons.Uno.csproj" ExactVersion="true" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="IgnoresAccessChecksToGenerator" PrivateAssets="All" />
<PackageReference Include="Uno.UI" />
</ItemGroup>
</Otherwise>
Expand Down
6 changes: 0 additions & 6 deletions FluentIcons.Uwp/SymbolIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,14 @@ public partial class SymbolIcon : FontIcon
#endif
internal static readonly FontFamily System = new($"ms-appx:///{AssetsNamespace}/Assets/FluentSystemIcons.ttf#Fluent System Icons");
internal static readonly FontFamily Seagull = new($"ms-appx:///{AssetsNamespace}/Assets/SeagullFluentIcons.ttf#Seagull Fluent Icons");
#if !HAS_UNO
internal static bool UseSegoeMetricsDefaultValue = false;
#endif

public static DependencyProperty SymbolProperty { get; } =
DependencyProperty.Register(nameof(Symbol), typeof(Symbol), typeof(SymbolIcon), new PropertyMetadata(Symbol.Home, OnSymbolPropertiesChanged));
public static DependencyProperty IconVariantProperty { get; } =
DependencyProperty.Register(nameof(IconVariant), typeof(IconVariant), typeof(SymbolIcon), new PropertyMetadata(default(IconVariant), OnSymbolPropertiesChanged));
public static DependencyProperty UseSegoeMetricsProperty { get; } =
#if !HAS_UNO
DependencyProperty.Register(nameof(UseSegoeMetrics), typeof(bool), typeof(SymbolIcon), PropertyMetadata.Create(() => UseSegoeMetricsDefaultValue, OnSymbolPropertiesChanged));
#else
DependencyProperty.Register(nameof(UseSegoeMetrics), typeof(bool), typeof(SymbolIcon), new PropertyMetadata(false, OnSymbolPropertiesChanged));
#endif

private string _glyph;

Expand Down
10 changes: 0 additions & 10 deletions FluentIcons.WinUI/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,13 @@ public static class Extensions
{
public static Application UseSegoeMetrics(this Application app)
{
#if !HAS_UNO
SymbolIcon.UseSegoeMetricsDefaultValue = true;
#else
SymbolIcon.UseSegoeMetricsProperty.GetMetadata(typeof(SymbolIcon)).DefaultValue = true;
SymbolIconSource.UseSegoeMetricsProperty.GetMetadata(typeof(SymbolIconSource)).DefaultValue = true;
#endif
return app;
}

public static IHostBuilder UseSegoeMetrics(this IHostBuilder builder)
{
#if !HAS_UNO
SymbolIcon.UseSegoeMetricsDefaultValue = true;
#else
SymbolIcon.UseSegoeMetricsProperty.GetMetadata(typeof(SymbolIcon)).DefaultValue = true;
SymbolIconSource.UseSegoeMetricsProperty.GetMetadata(typeof(SymbolIconSource)).DefaultValue = true;
#endif
return builder;
}
}
10 changes: 2 additions & 8 deletions FluentIcons.WinUI/FluentIcons.WinUI.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) or '$(EnableWindowsTargeting)' == 'true'">
$(TargetFrameworks);net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0
$(TargetFrameworks);net6.0-windows10.0.17763.0;net8.0-windows10.0.17763.0
</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst;net7.0-macos</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-macos</TargetFrameworks>
<Description>FluentUI System Icons control library for WinUI.</Description>
<PackageTags>$(PackageTags);WinUI</PackageTags>
<RootNamespace>FluentIcons.WinUI</RootNamespace>
<EnableMsixTooling>true</EnableMsixTooling>
<GenerateLibraryLayout>true</GenerateLibraryLayout>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
</PropertyGroup>

<ItemGroup>
Expand All @@ -25,16 +24,11 @@
</When>

<Otherwise>
<ItemGroup>
<InternalsAssemblyName Include="Uno.UI" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FluentIcons.Uno\FluentIcons.Uno.csproj" ExactVersion="true" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="IgnoresAccessChecksToGenerator" PrivateAssets="All" />
<PackageReference Include="Uno.WinUI" />
</ItemGroup>
</Otherwise>
Expand Down
6 changes: 0 additions & 6 deletions FluentIcons.WinUI/SymbolIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,14 @@ public partial class SymbolIcon : FontIcon
#endif
internal static readonly FontFamily System = new($"ms-appx:///{AssetsNamespace}/Assets/FluentSystemIcons.ttf#Fluent System Icons");
internal static readonly FontFamily Seagull = new($"ms-appx:///{AssetsNamespace}/Assets/SeagullFluentIcons.ttf#Seagull Fluent Icons");
#if !HAS_UNO
internal static bool UseSegoeMetricsDefaultValue = false;
#endif

public static DependencyProperty SymbolProperty { get; } =
DependencyProperty.Register(nameof(Symbol), typeof(Symbol), typeof(SymbolIcon), new PropertyMetadata(Symbol.Home, OnSymbolPropertiesChanged));
public static DependencyProperty IconVariantProperty { get; } =
DependencyProperty.Register(nameof(IconVariant), typeof(IconVariant), typeof(SymbolIcon), new PropertyMetadata(default(IconVariant), OnSymbolPropertiesChanged));
public static DependencyProperty UseSegoeMetricsProperty { get; } =
#if !HAS_UNO
DependencyProperty.Register(nameof(UseSegoeMetrics), typeof(bool), typeof(SymbolIcon), PropertyMetadata.Create(() => UseSegoeMetricsDefaultValue, OnSymbolPropertiesChanged));
#else
DependencyProperty.Register(nameof(UseSegoeMetrics), typeof(bool), typeof(SymbolIcon), new PropertyMetadata(false, OnSymbolPropertiesChanged));
#endif

private string _glyph;

Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ A multi-framework control library of [fluentui-system-icons](https://github.com/

## Packages

| Package | Platform |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [![FluentIcons.Common](https://img.shields.io/nuget/v/FluentIcons.Common?label=FluentIcons.Common)](https://www.nuget.org/packages/FluentIcons.Common) | _meta package_ |
| [![FluentIcons.Uno](https://img.shields.io/nuget/v/FluentIcons.Uno?label=FluentIcons.Uno)](https://www.nuget.org/packages/FluentIcons.Uno) | _meta package_ |
| [![FluentIcons.Avalonia](https://img.shields.io/nuget/v/FluentIcons.Avalonia?label=FluentIcons.Avalonia)](https://www.nuget.org/packages/FluentIcons.Avalonia) | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/avalonia.svg) Avalonia 11](https://www.nuget.org/packages/Avalonia/11.0.0) |
| [![FluentIcons.Avalonia.Fluent](https://img.shields.io/nuget/v/FluentIcons.Avalonia.Fluent?label=FluentIcons.Avalonia.Fluent)](https://www.nuget.org/packages/FluentIcons.Avalonia.Fluent) | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/avalonia-fluent.svg) FluentAvalonia 2](https://www.nuget.org/packages/FluentAvaloniaUI/2.0.0) (Avalonia 11) |
| [![FluentIcons.Maui](https://img.shields.io/nuget/v/FluentIcons.Maui?label=FluentIcons.Maui)](https://www.nuget.org/packages/FluentIcons.Maui) | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/maui.svg) MAUI 8](https://www.nuget.org/packages/Microsoft.Maui.Sdk/8.0.3) |
| [![FluentIcons.Uwp](https://img.shields.io/nuget/v/FluentIcons.Uwp?label=FluentIcons.Uwp)](https://www.nuget.org/packages/FluentIcons.Uwp) | ![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/windows-10.svg) UWP 10.0.10773 <br/> [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/uno.svg) Uno.UI 5](https://www.nuget.org/packages/Uno.UI/5.0.19) |
| [![FluentIcons.WinUI](https://img.shields.io/nuget/v/FluentIcons.WinUI?label=FluentIcons.WinUI)](https://www.nuget.org/packages/FluentIcons.WinUI) | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/wasdk.svg) Windows App SDK 1.2](https://www.nuget.org/packages/Microsoft.WindowsAppSDK/1.2.221109.1) <br/> [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/uno.svg) Uno.WinUI 5](https://www.nuget.org/packages/Uno.WinUI/5.0.19) |
| [![FluentIcons.WPF](https://img.shields.io/nuget/v/FluentIcons.WPF?label=FluentIcons.WPF)](https://www.nuget.org/packages/FluentIcons.WPF) | ![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/dotnet.svg) .NET Framework 4.6.2 <br/> ![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/dotnet.svg) .NET 6 |
| Package | Platform |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [![FluentIcons.Common](https://img.shields.io/nuget/v/FluentIcons.Common?label=FluentIcons.Common)](https://www.nuget.org/packages/FluentIcons.Common) | _meta package_ |
| [![FluentIcons.Uno](https://img.shields.io/nuget/v/FluentIcons.Uno?label=FluentIcons.Uno)](https://www.nuget.org/packages/FluentIcons.Uno) | _meta package_ |
| [![FluentIcons.Avalonia](https://img.shields.io/nuget/v/FluentIcons.Avalonia?label=FluentIcons.Avalonia)](https://www.nuget.org/packages/FluentIcons.Avalonia) | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/avalonia.svg) Avalonia 11](https://www.nuget.org/packages/Avalonia/11.0.0) |
| [![FluentIcons.Avalonia.Fluent](https://img.shields.io/nuget/v/FluentIcons.Avalonia.Fluent?label=FluentIcons.Avalonia.Fluent)](https://www.nuget.org/packages/FluentIcons.Avalonia.Fluent) | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/avalonia-fluent.svg) FluentAvalonia 2](https://www.nuget.org/packages/FluentAvaloniaUI/2.0.0) (Avalonia 11) |
| [![FluentIcons.Maui](https://img.shields.io/nuget/v/FluentIcons.Maui?label=FluentIcons.Maui)](https://www.nuget.org/packages/FluentIcons.Maui) | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/maui.svg) MAUI 8](https://www.nuget.org/packages/Microsoft.Maui.Sdk/8.0.3) |
| [![FluentIcons.Uwp](https://img.shields.io/nuget/v/FluentIcons.Uwp?label=FluentIcons.Uwp)](https://www.nuget.org/packages/FluentIcons.Uwp) | ![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/windows-10.svg) UWP 10.0.10773 <br/> [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/uno.svg) Uno.UI 5.4](https://www.nuget.org/packages/Uno.UI/5.4.22) |
| [![FluentIcons.WinUI](https://img.shields.io/nuget/v/FluentIcons.WinUI?label=FluentIcons.WinUI)](https://www.nuget.org/packages/FluentIcons.WinUI) | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/wasdk.svg) Windows App SDK 1.2](https://www.nuget.org/packages/Microsoft.WindowsAppSDK/1.2.221109.1) <br/> [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/uno.svg) Uno.WinUI 5.4](https://www.nuget.org/packages/Uno.WinUI/5.4.22) |
| [![FluentIcons.WPF](https://img.shields.io/nuget/v/FluentIcons.WPF?label=FluentIcons.WPF)](https://www.nuget.org/packages/FluentIcons.WPF) | ![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/dotnet.svg) .NET Framework 4.6.2 <br/> ![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/dotnet.svg) .NET 6 |

### Legacy

| Ref | Package | Platform |
| ----------------------------------------------------------------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [avalonia-v0.10](https://github.com/davidxuang/FluentIcons/tree/backports/avalonia-v0.10) | `FluentIcons.Avalonia` | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/avalonia.svg) Avalonia 0.10](https://www.nuget.org/packages/Avalonia/0.10.0) |
| [avalonia-v0.10](https://github.com/davidxuang/FluentIcons/tree/backports/avalonia-v0.10) | `FluentIcons.Avalonia.Fluent` | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/avalonia-fluent.svg) FluentAvalonia 1.3](https://www.nuget.org/packages/FluentAvaloniaUI/1.3.0) (Avalonia 0.10) |
| [1.1.262](https://github.com/davidxuang/FluentIcons/tree/1.1.262) | `FluentIcons.Uwp` | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/uno.svg) Uno.UI 5.0](https://www.nuget.org/packages/Uno.UI/5.0.19) |
| [1.1.262](https://github.com/davidxuang/FluentIcons/tree/1.1.262) | `FluentIcons.WinUI` | [![](https://cdn.jsdelivr.net/gh/davidxuang/FluentIcons@static/assets/uno.svg) Uno.WinUI 5.0](https://www.nuget.org/packages/Uno.WinUI/5.0.19) |

## Usage

Expand Down

0 comments on commit 21c6a52

Please sign in to comment.