Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix icon glyph issue #500

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion demo/Semi.Avalonia.Demo/Pages/IconDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
Padding="0"
Margin="10"
Width="200"
Height="120">
Height="120"
Click="Button_Clicked">
<StackPanel Spacing="8">
<PathIcon
Theme="{DynamicResource InnerPathIcon}"
Expand Down
4 changes: 2 additions & 2 deletions demo/Semi.Avalonia.Demo/Pages/Overview.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
<PathIcon
Width="32"
Height="32"
Data="M10.6201 17.5C6.06377 17.5 2.37012 13.8063 2.37012 9.25C2.37012 4.69365 6.06377 1 10.6201 1V17.5ZM13.3701 6.5C17.9265 6.5 21.6201 10.1936 21.6201 14.75C21.6201 19.3063 17.9265 23 13.3701 23V6.5Z" />
Data="{StaticResource SemiIconSemiLogo}" />
<PathIcon
Width="10"
Height="10"
Margin="20,0"
Data="M20.5 13.5C21.3284 13.5 22 12.8284 22 12C22 11.1716 21.3284 10.5 20.5 10.5L13.5 10.5L13.5 3.5C13.5 2.67157 12.8284 2 12 2C11.1716 2 10.5 2.67157 10.5 3.5L10.5 10.5L3.5 10.5C2.67157 10.5 2 11.1716 2 12C2 12.8284 2.67157 13.5 3.5 13.5L10.5 13.5V20.5C10.5 21.3284 11.1716 22 12 22C12.8284 22 13.5 21.3284 13.5 20.5V13.5L20.5 13.5Z" />
Data="{StaticResource SemiIconPlus}" />
<Image Width="32" Height="32">
<Image.Source>
<DrawingImage>
Expand Down
4 changes: 2 additions & 2 deletions demo/Semi.Avalonia.Demo/Pages/PathIconDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<StackPanel.Styles>
<Style Selector="PathIcon">
<Setter Property="Theme" Value="{DynamicResource InnerPathIcon}" />
<Setter Property="Data" Value="M10.5 2C5.80558 2 2 5.80558 2 10.5C2 15.1944 5.80558 19 10.5 19C12.3054 19 13.9794 18.4371 15.356 17.4773L19.4393 21.5606C20.0251 22.1464 20.9749 22.1464 21.5606 21.5606C22.1464 20.9749 22.1464 20.0251 21.5606 19.4393L17.4773 15.356C18.4371 13.9794 19 12.3054 19 10.5C19 5.80558 15.1944 2 10.5 2ZM5 10.5C5 7.46243 7.46243 5 10.5 5C13.5376 5 16 7.46243 16 10.5C16 13.5376 13.5376 16 10.5 16C7.46243 16 5 13.5376 5 10.5Z" />
<Setter Property="Data" Value="{StaticResource SemiIconSearch}" />
</Style>
</StackPanel.Styles>
<PathIcon Classes="ExtraSmall" />
Expand All @@ -31,6 +31,6 @@
Height="{Binding #width.Value}"
Foreground="{DynamicResource SemiBlue6}"
BorderBrush="{DynamicResource SemiRed6}"
Data="M12 3L2 12H5V20H19V12H22L12 3M13 18H11V16H13V18M13 14H11V8H13V14Z" />
Data="{StaticResource SemiIconHome}" />
</StackPanel>
</UserControl>
6 changes: 3 additions & 3 deletions demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<ToggleSwitch.Content>
<PathIcon
Theme="{DynamicResource InnerPathIcon}"
Data="M5 2H19C20.6569 2 22 3.34315 22 5V19C22 20.6569 20.6569 22 19 22H5C3.34315 22 2 20.6569 2 19V5C2 3.34315 3.34315 2 5 2ZM6 4C5.44772 4 5 4.44772 5 5V19C5 19.5523 5.44772 20 6 20H9C9.55229 20 10 19.5523 10 19V5C10 4.44772 9.55229 4 9 4H6Z" />
Data="{StaticResource SemiIconSidebar}" />
</ToggleSwitch.Content>
</ToggleSwitch>
<ToggleSwitch
Expand All @@ -81,12 +81,12 @@
<ToggleSwitch.OnContent>
<PathIcon
Theme="{DynamicResource InnerPathIcon}"
Data="M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13" />
Data="{StaticResource SemiIconSun}" />
</ToggleSwitch.OnContent>
<ToggleSwitch.OffContent>
<PathIcon
Theme="{DynamicResource InnerPathIcon}"
Data="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17 15C17.476 15 17.9408 14.9525 18.3901 14.862C17.296 17.3011 14.8464 19 12 19C8.13401 19 5 15.866 5 12C5 8.60996 7.40983 5.78277 10.6099 5.13803C10.218 6.01173 10 6.98041 10 8C10 11.866 13.134 15 17 15Z" />
Data="{StaticResource SemiIconMoon}" />
</ToggleSwitch.OffContent>
</ToggleSwitch>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion demo/Semi.Avalonia.Demo/Views/MainView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</StackPanel.Styles>

<Button Command="{Binding OpenUrlCommand}" CommandParameter="{Binding DocumentationUrl}">
<PathIcon Data="{StaticResource SemiIconSidebar}" />
<PathIcon Data="{StaticResource SemiIconGlobe}" />
</Button>

<Button Command="{Binding OpenUrlCommand}" CommandParameter="{Binding RepoUrl}">
Expand Down
40 changes: 20 additions & 20 deletions src/Semi.Avalonia/Themes/Shared/Icon.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@
M22 3a1 1 0 1 0-2 0v17H3a1 1 0 1 0 0 2h18a1 1 0 0 0 1-1V3ZM3 2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3Zm1 10V4h8v8H4Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconBox">
m2 6 8.55-4.7a3 3 0 0 1 2.9 0L22 6l-10 5L2 6Z,
m11 12.5-10-5v8.65a3 3 0 0 0 1.66 2.68L11 23V12.5Z,
m23 7.5-10 5V23l8.34-4.17A3 3 0 0 0 23 16.15V7.5Z
M2 6l 8.55-4.7a3 3 0 0 1 2.9 0L22 6l-10 5L2 6Z,
M11 12.5l-10-5v8.65a3 3 0 0 0 1.66 2.68L11 23V12.5Z,
M23 7.5l-10 5V23l8.34-4.17A3 3 0 0 0 23 16.15V7.5Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconBrackets">
M7 2.5c-.68 0-1.43.21-1.95.88a2.82 2.82 0 0 0-.53 1.7c-.01.46.04.96.1 1.37l.02.2c.05.38.09.72.11 1.07.06.86-.03 1.41-.27 1.8-.2.3-.71.78-2.2 1a1.5 1.5 0 0 0 0 2.96c1.49.22 2 .7 2.2 1 .24.39.33.94.27 1.8-.02.35-.06.7-.11 1.07l-.03.2c-.05.41-.1.91-.1 1.38.02.43.09 1.1.54 1.69.52.67 1.27.88 1.95.88h2a1.5 1.5 0 1 0 0-3H7.53l.06-.58.02-.19c.05-.37.1-.8.14-1.26.06-1.02.03-2.4-.76-3.61-.2-.32-.44-.6-.72-.86.28-.26.52-.54.72-.86.79-1.21.82-2.59.76-3.61-.03-.45-.09-.9-.14-1.26l-.02-.19-.06-.58H9a1.5 1.5 0 1 0 0-3H7Zm10 0c.68 0 1.43.21 1.95.88.45.58.52 1.26.53 1.7.01.46-.04.96-.1 1.37l-.02.2c-.05.38-.09.72-.11 1.07-.06.86.03 1.41.27 1.8.2.3.71.78 2.2 1a1.5 1.5 0 0 1 0 2.96c-1.49.22-2 .7-2.2 1-.24.39-.33.94-.27 1.8.02.35.06.7.11 1.07l.03.2c.05.41.1.91.1 1.38a2.82 2.82 0 0 1-.54 1.69c-.52.67-1.27.88-1.95.88h-2a1.5 1.5 0 1 1 0-3h1.47l-.06-.58-.02-.19c-.05-.37-.1-.8-.14-1.26a5.82 5.82 0 0 1 .76-3.61c.2-.32.44-.6.72-.86a4.38 4.38 0 0 1-.72-.86 5.82 5.82 0 0 1-.76-3.61c.03-.45.09-.9.14-1.26l.02-.19.06-.58H15a1.5 1.5 0 1 1 0-3h2Z
Expand Down Expand Up @@ -333,10 +333,10 @@
m4 17.9.94-.74a2.97 2.97 0 0 1 1.85-.63H20V5H4v12.9ZM21 3H3a1 1 0 0 0-1 1v15.95a1 1 0 0 0 1.62.79l2.55-2a1 1 0 0 1 .62-.21H21a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1ZM8 8a1 1 0 0 0 0 2h8a1 1 0 1 0 0-2H8Zm-1 5a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconComponent">
m6 4 5-4 5 4-5 5.5L6 4Z,
m18 6 4 5-4 5-5.5-5L18 6Z,
m4 16-4-5 4-5 5.5 5L4 16Z,
m16 18-5 4-5-4 5-5.5 5 5.5Z
M6 4l 5-4 5 4-5 5.5L6 4Z,
M18 6l 4 5-4 5-5.5-5L18 6Z,
M4 16l-4-5 4-5 5.5 5L4 16Z,
M16 18l-5 4-5-4 5-5.5 5 5.5Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconComponentPlaceholderStroked">
M3 2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3Zm1 5V4h7v3H4Zm8 8a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1h-9Zm1 5v-3h7v3h-7Zm2-17a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1V3Zm2 1v7h3V4h-3ZM3 11a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-9a1 1 0 0 0-1-1H3Zm1 9v-7h3v7H4Z
Expand Down Expand Up @@ -457,8 +457,8 @@
M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm7.86-11a7.86 7.86 0 0 1-13.47 5.5L12 12V4.14A7.86 7.86 0 0 1 19.86 12Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconEdit">
m14.5 4.5 5 5 2.09-2.09a2 2 0 0 0 0-2.82L19.4 2.4a2 2 0 0 0-2.82 0L14.5 4.5Z,
m2.25 21.13 1.68-5.88a1 1 0 0 1 .25-.43L13 6l5 5-8.82 8.82a1 1 0 0 1-.43.25l-5.88 1.68a.5.5 0 0 1-.62-.62Z
M14.5 4.5l 5 5 2.09-2.09a2 2 0 0 0 0-2.82L19.4 2.4a2 2 0 0 0-2.82 0L14.5 4.5Z,
M2.25 21.13l 1.68-5.88a1 1 0 0 1 .25-.43L13 6l5 5-8.82 8.82a1 1 0 0 1-.43.25l-5.88 1.68a.5.5 0 0 1-.62-.62Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconEdit2Stroked">
M21.14 4.41 19.73 3a2 2 0 0 0-2.83 0l-1.41 1.41-.71.71L8.3 11.6a1 1 0 0 0-.28.53l-.6 3.43a1 1 0 0 0 1.16 1.16l3.43-.6a1 1 0 0 0 .53-.28l6.47-6.47.7-.7 1.42-1.42a2 2 0 0 0 0-2.83Zm-2.12 2.13.7-.71-1.4-1.42-.71.71 1.41 1.42Zm-1.41 1.41-1.42-1.41-6.24 6.24-.3 1.72 1.71-.3 6.25-6.25ZM2 5a1 1 0 0 1 1-1h7a1 1 0 1 1 0 2H4v14h14v-6a1 1 0 1 1 2 0v7a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5Z
Expand Down Expand Up @@ -596,9 +596,9 @@
<StreamGeometry x:Key="SemiIconFullScreenStroked">
M11.2 11.2a1 1 0 0 1-1.4 0L4 5.42V9a1 1 0 1 1-2 0V3a1 1 0 0 1 .29-.7v-.01A1 1 0 0 1 3 2H9a1 1 0 0 1 0 2H5.41l5.8 5.8a1 1 0 0 1 0 1.4Zm1.6 1.6a1 1 0 0 1 1.4 0l5.8 5.79V15a1 1 0 1 1 2 0v6a1 1 0 0 1-.29.7v.01a1 1 0 0 1-.7.29H15a1 1 0 1 1 0-2h3.59l-5.8-5.8a1 1 0 0 1 0-1.4Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconGallery">
M15.66.75 2.46 4.22A3 3 0 0 0 .34 7.95l2.35 8.23a3 3 0 0 0 .31.7V11a4 4 0 0 1 4-4h13.5l-1.2-4.18A3 3 0 0 0 15.67.75Z
</StreamGeometry>
<!-- <StreamGeometry x:Key="SemiIconGallery"> -->
<!-- M15.66.75 2.46 4.22A3 3 0 0 0 .34 7.95l2.35 8.23a3 3 0 0 0 .31.7V11a4 4 0 0 1 4-4h13.5l-1.2-4.18A3 3 0 0 0 15.67.75Z -->
<!-- </StreamGeometry> -->
<StreamGeometry x:Key="SemiIconGift">
M4 4.5C4 2.6 5.42 1 7.5 1c.96 0 1.78.48 2.41 1.03a9.26 9.26 0 0 1 1.62 1.93c.17.26.33.52.47.78.14-.26.3-.52.47-.78.44-.67.98-1.38 1.62-1.93A3.73 3.73 0 0 1 16.5 1C18.58 1 20 2.6 20 4.5c0 .98-.4 1.86-1.05 2.5H21a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-8V6h-2v5H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h2.05A3.49 3.49 0 0 1 4 4.5Zm7 7.5H4v8c0 1.1.9 2 2 2h5V12Zm2 10h5a2 2 0 0 0 2-2v-8h-7v10ZM10.41 6c-.16-.3-.35-.63-.56-.96a7.3 7.3 0 0 0-1.25-1.5C8.15 3.14 7.8 3 7.5 3 6.58 3 6 3.64 6 4.5 6 5.33 6.67 6 7.5 6h2.91Zm3.74-.96c-.21.33-.4.66-.56.96h2.91c.83 0 1.5-.67 1.5-1.5 0-.86-.58-1.5-1.5-1.5-.29 0-.65.15-1.1.54a7.3 7.3 0 0 0-1.25 1.5Z
</StreamGeometry>
Expand Down Expand Up @@ -897,8 +897,8 @@
</StreamGeometry>
<StreamGeometry x:Key="SemiIconMicrophoneOff">
M7.5 5.5a4.5 4.5 0 0 1 9 0v.59l3.8-3.8a1 1 0 1 1 1.4 1.42l-18 18a1 1 0 0 1-1.4-1.42l3.6-3.6A7.97 7.97 0 0 1 4 11.5a1 1 0 1 1 2 0c0 1.42.5 2.73 1.32 3.76L8.4 14.2a4.48 4.48 0 0 1-.89-2.69v-6Z,
m12 16 4.5-4.5A4.5 4.5 0 0 1 12 16Z,
m10.65 17.35-1.6 1.6A8 8 0 0 0 20 11.5a1 1 0 1 0-1.99-.01 6 6 0 0 1-7.35 5.85Z,
M12 16l 4.5-4.5A4.5 4.5 0 0 1 12 16Z,
M10.65 17.35l-1.6 1.6A8 8 0 0 0 20 11.5a1 1 0 1 0-1.99-.01 6 6 0 0 1-7.35 5.85Z,
M8 21a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2H8Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconMinimize">
Expand Down Expand Up @@ -1054,9 +1054,9 @@
<StreamGeometry x:Key="SemiIconRefresh2">
M16.56.44a1.5 1.5 0 0 0-2.12 2.12L15.88 4H12a10 10 0 1 0 10 10 1.5 1.5 0 0 0-3 0 7 7 0 1 1-7-7h3.88l-1.44 1.44a1.5 1.5 0 0 0 2.12 2.12l4-4a1.5 1.5 0 0 0 0-2.12l-4-4Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconRegExp">
M16.75 1c.83 0 1.5.67 1.5 1.5v2.7l2.17-1.45a1.5 1.5 0 1 1 1.66 2.5L19.46 8l2.62 1.75a1.5 1.5 0 1 1-1.66 2.5l-2.17-1.45v2.7a1.5 1.5 0 0 1-3 0v-2.7l-2.17 1.45a1.5 1.5 0 0 1-1.66-2.5L14.05 8l-2.63-1.75a1.5 1.5 0 0 1 1.66-2.5l2.17 1.45V2.5c0-.83.67-1.5 1.5-1.5Z
</StreamGeometry>
<!-- <StreamGeometry x:Key="SemiIconRegExp"> -->
<!-- M16.75 1c.83 0 1.5.67 1.5 1.5v2.7l2.17-1.45a1.5 1.5 0 1 1 1.66 2.5L19.46 8l2.62 1.75a1.5 1.5 0 1 1-1.66 2.5l-2.17-1.45v2.7a1.5 1.5 0 0 1-3 0v-2.7l-2.17 1.45a1.5 1.5 0 0 1-1.66-2.5L14.05 8l-2.63-1.75a1.5 1.5 0 0 1 1.66-2.5l2.17 1.45V2.5c0-.83.67-1.5 1.5-1.5Z -->
<!-- </StreamGeometry> -->
<StreamGeometry x:Key="SemiIconReply">
m2.28 11.31 8.07-8.5a1 1 0 0 1 1.71.7v4C19.02 7.5 23 12 23 18c0 .5-.24 2.18-.56 2.31-.13.06-.28-.01-.43-.32-2.23-4.46-4.48-4.5-9.95-4.5v5a1 1 0 0 1-1.71.7l-8.07-8.5a1 1 0 0 1 0-1.38Z
</StreamGeometry>
Expand All @@ -1068,7 +1068,7 @@
</StreamGeometry>
<StreamGeometry x:Key="SemiIconRestart">
M4.5 2C3.67 2 3 2.67 3 3.5v17a1.5 1.5 0 0 0 3 0v-17C6 2.67 5.33 2 4.5 2Z,
m8 11.21 11.38-8.94a1 1 0 0 1 1.62.79v17.88a1 1 0 0 1-1.62.79L8 12.79a1 1 0 0 1 0-1.58Z
M8 11.21l 11.38-8.94a1 1 0 0 1 1.62.79v17.88a1 1 0 0 1-1.62.79L8 12.79a1 1 0 0 1 0-1.58Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconRingChartStroked">
M20.95 13A9 9 0 1 1 11 3.05V7.1a5 5 0 1 0 5.9 5.9h4.05Zm0-2H16.9A5 5 0 0 0 13 7.1V3.05A9 9 0 0 1 20.95 11ZM23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-8 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z
Expand Down Expand Up @@ -1198,8 +1198,8 @@
M12 2a1 1 0 0 1 1 1v18a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1Zm5 3a1 1 0 0 1 1 1v12a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1ZM3 9a1 1 0 1 0-2 0v6a1 1 0 1 0 2 0V9Zm19-1a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1ZM8 6a1 1 0 1 0-2 0v12a1 1 0 1 0 2 0V6Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconSort">
m6.45 8.34 4.8-6.48a1 1 0 0 1 1.5 0l4.8 6.48A1 1 0 0 1 16.8 10H7.2a1 1 0 0 1-.75-1.66Z,
m17.55 15.66-4.8 6.48a1 1 0 0 1-1.5 0l-4.8-6.48A1 1 0 0 1 7.2 14h9.6a1 1 0 0 1 .75 1.66Z
M6.45 8.34l 4.8-6.48a1 1 0 0 1 1.5 0l4.8 6.48A1 1 0 0 1 16.8 10H7.2a1 1 0 0 1-.75-1.66Z,
M17.55 15.66l-4.8 5.48a1 1 0 0 1-1.5 0l-4.8-5.48A1 1 0 0 1 7.2 14h9.6a1 1 0 0 1 .75 1.66Z
</StreamGeometry>
<StreamGeometry x:Key="SemiIconSortStroked">
M6.61 14.04a1 1 0 0 1 .89-.54h9a1 1 0 0 1 .82 1.57l-4.5 6.5a1 1 0 0 1-1.64 0l-4.5-6.5a1 1 0 0 1-.07-1.03Zm2.8 1.46L12 19.24l2.6-3.74H9.4Z,
Expand Down