From 1a2628eff0c5d1fb5503215b2f0a4881155fefab Mon Sep 17 00:00:00 2001 From: rabbitism Date: Sat, 27 Jan 2024 03:08:20 +0800 Subject: [PATCH 1/2] feat: add active class to path icon. --- demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml | 22 +++++++++++++++++++ .../Pages/IconDemo.axaml.cs | 13 +++++++++++ demo/Semi.Avalonia.Demo/Views/MainView.axaml | 3 +++ src/Semi.Avalonia/Controls/PathIcon.axaml | 4 ++++ 4 files changed, 42 insertions(+) create mode 100644 demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml create mode 100644 demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml.cs diff --git a/demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml new file mode 100644 index 0000000..6e0214f --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml.cs new file mode 100644 index 0000000..f24fb46 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Semi.Avalonia.Demo.Pages; + +public partial class PathIconDemo : UserControl +{ + public PathIconDemo() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Views/MainView.axaml b/demo/Semi.Avalonia.Demo/Views/MainView.axaml index a87d488..0b40a59 100644 --- a/demo/Semi.Avalonia.Demo/Views/MainView.axaml +++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml @@ -144,6 +144,9 @@ + + + diff --git a/src/Semi.Avalonia/Controls/PathIcon.axaml b/src/Semi.Avalonia/Controls/PathIcon.axaml index cd15865..489f032 100644 --- a/src/Semi.Avalonia/Controls/PathIcon.axaml +++ b/src/Semi.Avalonia/Controls/PathIcon.axaml @@ -11,6 +11,7 @@ @@ -18,5 +19,8 @@ + From a9b9737065fab077bb9fb255416f4c250d36f918 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Sat, 27 Jan 2024 03:14:43 +0800 Subject: [PATCH 2/2] misc: rename file. --- .../Pages/{IconDemo.axaml => PathIconDemo.axaml} | 0 .../Pages/{IconDemo.axaml.cs => PathIconDemo.axaml.cs} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename demo/Semi.Avalonia.Demo/Pages/{IconDemo.axaml => PathIconDemo.axaml} (100%) rename demo/Semi.Avalonia.Demo/Pages/{IconDemo.axaml.cs => PathIconDemo.axaml.cs} (100%) diff --git a/demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/PathIconDemo.axaml similarity index 100% rename from demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/PathIconDemo.axaml diff --git a/demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/PathIconDemo.axaml.cs similarity index 100% rename from demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/PathIconDemo.axaml.cs