Skip to content

Commit

Permalink
refactor: IconPacks.Avalonia.Core
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Oct 26, 2024
1 parent 926fdfc commit d3b8736
Show file tree
Hide file tree
Showing 24 changed files with 1,197 additions and 839 deletions.
16 changes: 11 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
root = true

[*]
end_of_line = CRLF
end_of_line = crlf
indent_style = space
max_line_length = 190

; 4-column tab indentation
[*.{cs,csproj,xaml,xml,props,targets}]
indent_style = space
[*.{cs,csproj,xaml,xml,props,targets,nuspec}]
indent_size = 4

[*.{md,yml}]
indent_style = space
[*.{yml,json}]
indent_size = 2
max_line_length = off

[*.md]
indent_size = 2
max_line_length = off
trim_trailing_whitespace = false
39 changes: 20 additions & 19 deletions src/AvaloniaApp/AvaloniaApp.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.4" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.4" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.4" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.4" />
</ItemGroup>
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\AvaloniaIconPacks\AvaloniaIconPacks.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.4" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.4" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.4" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.4" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AvaloniaIconPacks\AvaloniaIconPacks.csproj" />
</ItemGroup>

</Project>
15 changes: 8 additions & 7 deletions src/AvaloniaApp/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:iconPacks="clr-namespace:MahApps.Metro.IconPacks;assembly=AvaloniaIconPacks"
xmlns:avaloniaApp="clr-namespace:AvaloniaApp"
xmlns:iconPacks="urn:iconpacks-avalonia"
xmlns:iconPacks1="clr-namespace:MahApps.Metro.IconPacks;assembly=AvaloniaIconPacks"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="AvaloniaApp.MainWindow"
Title="AvaloniaApp"
Expand All @@ -15,10 +16,10 @@
<TextBlock Margin="0 10" Text="Welcome to Avalonia!" FontSize="22" FontWeight="SemiBold" />
<TextBlock Margin="0 10" Text="IconPacks - PackIconBoxIcons" FontSize="18" FontWeight="SemiBold" />

<ComboBox Name="BoxIcons" Width="200" ItemsSource="{avaloniaApp:Enums iconPacks:PackIconBoxIconsKind}"
SelectedItem="{x:Static iconPacks:PackIconBoxIconsKind.RegularRecycle}" />
<ComboBox Name="BoxIcons" Width="200" ItemsSource="{avaloniaApp:Enums iconPacks1:PackIconBoxIconsKind}"
SelectedItem="{x:Static iconPacks1:PackIconBoxIconsKind.RegularRecycle}" />

<iconPacks:PackIconBoxIcons Margin="10"
<iconPacks1:PackIconBoxIcons Margin="10"
Kind="{Binding #BoxIcons.SelectedItem, Mode=OneWay}"
Foreground="{DynamicResource SystemControlHighlightAccentBrush}" />

Expand All @@ -30,13 +31,13 @@
</ComboBox>

<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5">
<iconPacks:PackIconBoxIcons Kind="{Binding #BoxIcons.SelectedItem, Mode=OneWay}"
<iconPacks1:PackIconBoxIcons Kind="{Binding #BoxIcons.SelectedItem, Mode=OneWay}"
Foreground="{DynamicResource SystemControlHighlightAccentBrush}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="5"
Width="144" Height="144" />
<iconPacks:PackIconBoxIcons Kind="{Binding #BoxIcons.SelectedItem, Mode=OneWay}"
<iconPacks1:PackIconBoxIcons Kind="{Binding #BoxIcons.SelectedItem, Mode=OneWay}"
Foreground="{DynamicResource SystemControlHighlightAccentBrush}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Expand All @@ -58,7 +59,7 @@
<CheckBox Name="SpinCheckBox" Margin="0 2" Content="Spin" IsChecked="True" />
<CheckBox Name="VisibilityCheckBox" Margin="0 2" Content="Visible" IsChecked="True" />

<iconPacks:PackIconBoxIcons Kind="RegularCog"
<iconPacks1:PackIconBoxIcons Kind="RegularCog"
Foreground="{DynamicResource SystemControlHighlightAccentBrush}"
ClipToBounds="False"
HorizontalAlignment="Center"
Expand Down
121 changes: 70 additions & 51 deletions src/AvaloniaIconPacks.TestApp.sln
Original file line number Diff line number Diff line change
@@ -1,51 +1,70 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.34916.146
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaIconPacks", "AvaloniaIconPacks\AvaloniaIconPacks.csproj", "{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaApp", "AvaloniaApp\AvaloniaApp.csproj", "{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|x64.ActiveCfg = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|x64.Build.0 = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|x86.ActiveCfg = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|x86.Build.0 = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|Any CPU.Build.0 = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|x64.ActiveCfg = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|x64.Build.0 = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|x86.ActiveCfg = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|x86.Build.0 = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|x64.ActiveCfg = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|x64.Build.0 = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|x86.ActiveCfg = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|x86.Build.0 = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|Any CPU.Build.0 = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|x64.ActiveCfg = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|x64.Build.0 = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|x86.ActiveCfg = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E6ECA210-1B2F-4011-A34A-7E9D2CC4721F}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.34916.146
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaIconPacks", "AvaloniaIconPacks\AvaloniaIconPacks.csproj", "{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaApp", "AvaloniaApp\AvaloniaApp.csproj", "{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IconPacks.Avalonia.Core", "IconPacks.Avalonia.Core\IconPacks.Avalonia.Core.csproj", "{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8AA3A5E7-A687-4781-9416-E96489E4C781}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|x64.ActiveCfg = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|x64.Build.0 = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|x86.ActiveCfg = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Debug|x86.Build.0 = Debug|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|Any CPU.Build.0 = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|x64.ActiveCfg = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|x64.Build.0 = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|x86.ActiveCfg = Release|Any CPU
{9D89109C-03C6-4F03-ACFF-0212CA6FAAA3}.Release|x86.Build.0 = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|x64.ActiveCfg = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|x64.Build.0 = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|x86.ActiveCfg = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Debug|x86.Build.0 = Debug|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|Any CPU.Build.0 = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|x64.ActiveCfg = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|x64.Build.0 = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|x86.ActiveCfg = Release|Any CPU
{3D1F4877-0B9D-4D2E-BA55-2527FB5F6552}.Release|x86.Build.0 = Release|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Debug|Any CPU.Build.0 = Debug|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Debug|x64.ActiveCfg = Debug|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Debug|x64.Build.0 = Debug|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Debug|x86.ActiveCfg = Debug|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Debug|x86.Build.0 = Debug|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Release|Any CPU.ActiveCfg = Release|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Release|Any CPU.Build.0 = Release|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Release|x64.ActiveCfg = Release|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Release|x64.Build.0 = Release|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Release|x86.ActiveCfg = Release|Any CPU
{870C9AFF-CB82-4A6B-BB0B-7AE19B43A766}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E6ECA210-1B2F-4011-A34A-7E9D2CC4721F}
EndGlobalSection
EndGlobal
34 changes: 21 additions & 13 deletions src/AvaloniaIconPacks/AvaloniaIconPacks.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);AVALONIA</DefineConstants>
<LangVersion>latest</LangVersion>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<AvaloniaResource Include="**/*.xaml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.1.4" />
</ItemGroup>

<PropertyGroup>
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);AVALONIA</DefineConstants>
<LangVersion>latest</LangVersion>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.1.4" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\IconPacks.Avalonia.Core\IconPacks.Avalonia.Core.csproj" />
</ItemGroup>

<ItemGroup>
<AvaloniaResource Include="**/*.xaml" />
</ItemGroup>

</Project>
19 changes: 9 additions & 10 deletions src/AvaloniaIconPacks/BoxIcons.xaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- <StyleInclude Source="avares://AvaloniaIconPacks/PackIconBoxIcons.xaml" /> -->
<Styles.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<MergeResourceInclude Source="avares://AvaloniaIconPacks/PackIconBoxIcons.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Styles.Resources>
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Styles.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<MergeResourceInclude Source="avares://AvaloniaIconPacks/PackIconBoxIcons.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Styles.Resources>
</Styles>
21 changes: 0 additions & 21 deletions src/AvaloniaIconPacks/Core/PackIconBase.cs

This file was deleted.

Loading

0 comments on commit d3b8736

Please sign in to comment.