feat: add avalonia PathIcon style.

This commit is contained in:
NaBian committed 2025-09-27 12:23:05 +08:00
1 parent 8527c88cd1
commit be9525c04c
41 files changed
+136 -56

No files matched your search

@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTheme x:Key="BorderRegion"
TargetType="Border">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTheme x:Key="ButtonBaseStyle"
TargetType="Button">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:system="clr-namespace:System;assembly=System.Runtime">
<ControlTheme x:Key="{x:Type ButtonSpinner}"
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="https://handyorg.github.io/handycontrol">
<ControlTheme x:Key="{x:Type CalendarButton}"
TargetType="CalendarButton">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="CheckBoxBaseStyle"
TargetType="CheckBox">
<Setter Property="Foreground"
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:system="clr-namespace:System;assembly=System.Runtime">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type ContentControl}"
TargetType="ContentControl">
<Setter Property="Template">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="https://handyorg.github.io/handycontrol">
<ControlTheme x:Key="ContextMenuBaseStyle"
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type DataValidationErrors}"
TargetType="DataValidationErrors">
<Setter Property="Template">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTemplate x:Key="ExpanderLeftTemplate"
TargetType="Expander">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type ItemsControl}"
TargetType="ItemsControl">
<Setter Property="Template">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTheme x:Key="LabelBaseStyle"
TargetType="Label">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTheme x:Key="ListBoxItemBaseStyle"
TargetType="ListBoxItem">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:sys="using:System">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="https://handyorg.github.io/handycontrol">
<ControlTheme x:Key="{x:Type MenuFlyoutPresenter}"
@@ -0,0 +1,53 @@
<!-- ReSharper disable once Xaml.RedundantNamespaceAlias -->
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<Styles.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<MergeResourceInclude Source="avares://HandyControl/Themes/Basic/Sizes.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Basic/Fonts.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Basic/Effects.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Basic/Geometries.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Basic/Paths.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Basic/Brushes.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Basic/Converters.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/DataValidationErrors.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/MenuFlyoutPresenter.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PopupRoot.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PathIcon.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ToolTip.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TextBlock.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ContentControl.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/UserControl.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Window.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Button.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/RepeatButton.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ToggleButton.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/RadioButton.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/CheckBox.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Border.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ItemsControl.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TabControl.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ScrollViewer.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ListBox.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TreeView.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Label.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Slider.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Expander.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ProgressBar.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Calendar.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TextBox.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ButtonSpinner.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/NumericUpDown.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ComboBox.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Menu.axaml" />
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ContextMenu.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Styles.Resources>
</Styles>
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:system="clr-namespace:System;assembly=System.Runtime">
@@ -0,0 +1,29 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type PathIcon}"
TargetType="PathIcon">
<Setter Property="Foreground"
Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="Background"
Value="Transparent" />
<Setter Property="Height"
Value="16" />
<Setter Property="Width"
Value="16" />
<Setter Property="Template">
<ControlTemplate>
<Border Background="{TemplateBinding Background}">
<Viewbox Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}">
<Path Data="{TemplateBinding Data}"
Fill="{TemplateBinding Foreground}"
Stretch="Uniform" />
</Viewbox>
</Border>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type PopupRoot}"
TargetType="PopupRoot">
<Setter Property="Background"
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTheme x:Key="ProgressBarBaseStyle"
TargetType="ProgressBar">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTheme x:Key="RadioButtonBaseStyle"
TargetType="RadioButton">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTheme x:Key="RepeatButtonBaseStyle"
TargetType="RepeatButton">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:converters="using:Avalonia.Controls.Converters">
<ControlTheme x:Key="ScrollBarBaseRepeatButton"
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTheme x:Key="SliderRepeatButtonHorizontalStyle"
TargetType="RepeatButton">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:tools="clr-namespace:HandyControl.Tools"
xmlns:system="clr-namespace:System;assembly=System.Runtime">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="TextBlockBaseStyle"
TargetType="TextBlock">
<Setter Property="VerticalAlignment"
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:system="clr-namespace:System;assembly=System.Runtime">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<ControlTheme x:Key="ToggleButtonBaseStyle"
BasedOn="{StaticResource ButtonBaseStyle}"
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="https://handyorg.github.io/handycontrol">
<ControlTheme x:Key="ToolTipBaseStyle"
TargetType="ToolTip">
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"
xmlns:hc="clr-namespace:HandyControl.Controls">
<Geometry x:Key="TreeArrow">M508.893248 762.931659a65.039498 65.039498 0 0 1-46.420659-19.485839L97.125746 371.004022c-25.143018-25.634319-24.752868-66.816849 0.881451-91.959868 25.648769-25.164693 66.809624-24.745643 91.959867 0.881451l318.933409 325.125238 318.933408-325.125238a65.025048 65.025048 0 0 1 92.841318 91.078417L555.313907 743.44582a65.025048 65.025048 0 0 1-46.420659 19.485839z</Geometry>
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type UserControl}"
TargetType="UserControl">
<Setter Property="Template">