Skip to content

Commit

Permalink
Improved UI for Desktop PathIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Oct 5, 2024
1 parent 1f77c56 commit b33f536
Show file tree
Hide file tree
Showing 17 changed files with 77 additions and 57 deletions.
12 changes: 12 additions & 0 deletions v2rayN/v2rayN.Desktop/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
<StyleInclude Source="avares://DialogHost.Avalonia/Styles.xaml" />
</Application.Styles>
<Application.Resources>
<ResourceDictionary>
<StreamGeometry x:Key="building_edit">M512 0a512 512 0 1 0 512 512A512 512 0 0 0 512 0z m47.402667 580.906667l-50.090667 50.816q-25.045333 24.448-45.098667 44.8c-13.397333 13.610667-24.405333 24.704-33.194666 33.493333s-13.994667 13.781333-15.701334 15.018667c-4.266667 3.797333-9.002667 7.722667-14.421333 11.904a77.397333 77.397333 0 0 1-17.066667 9.984 255.232 255.232 0 0 1-25.6 10.581333 832.426667 832.426667 0 0 1-70.528 22.485333c-11.093333 2.901333-19.285333 4.821333-24.704 5.589334-11.306667 1.28-18.816-0.384-22.485333-4.992a29.397333 29.397333 0 0 1-3.114667-23.210667 198.016 198.016 0 0 1 6.016-25.6c3.114667-11.093333 6.485333-22.485333 9.984-34.389333s6.997333-22.912 10.282667-32.896a164.821333 164.821333 0 0 1 8.106667-20.693334 96.64 96.64 0 0 1 8.533333-16 101.504 101.504 0 0 1 13.482667-16c2.517333-2.517333 8.533333-8.533333 17.493333-17.792s20.693333-20.992 34.389333-34.816l231.253334-231.253333 117.12 118.016-134.741334 134.741333z m224.938666-229.333334a51.2 51.2 0 0 1-9.984 15.701334q-7.509333 7.509333-13.482666 13.184c-4.010667 3.797333-7.381333 7.082667-10.282667 9.984s-6.485333 6.314667-9.386667 8.789333l-117.290666-117.162667c4.992-4.608 11.008-10.112 17.92-16.597333s12.8-11.605333 17.066666-15.317333a54.613333 54.613333 0 0 1 18.218667-9.685334 56.917333 56.917333 0 0 1 18.517333-2.517333 71.936 71.936 0 0 1 17.493334 2.816 94.464 94.464 0 0 1 14.72 5.589333 113.536 113.536 0 0 1 29.098666 24.106667 138.666667 138.666667 0 0 1 24.704 36.010667 66.389333 66.389333 0 0 1 4.266667 13.184 79.573333 79.573333 0 0 1 1.621333 15.701333 44.330667 44.330667 0 0 1-3.114666 16.213333z m0 0</StreamGeometry>
<StreamGeometry x:Key="building_add">M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0z m238.08 570.88h-179.2v179.2c0 32.768-26.112 58.88-58.88 58.88s-58.88-26.112-58.88-58.88v-179.2h-179.2c-32.768 0-58.88-26.112-58.88-58.88s26.112-58.88 58.88-58.88h179.2v-179.2c0-32.768 26.112-58.88 58.88-58.88s58.88 26.112 58.88 58.88v179.2h179.2c32.768 0 58.88 26.112 58.88 58.88s-26.112 58.88-58.88 58.88z</StreamGeometry>
<StreamGeometry x:Key="building_fit">M512 1024C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512zM216.576 488.789333h-23.168v46.421334h23.168v56.448c0 7.296 5.973333 13.226667 13.269333 13.226666h42.965334c7.296 0 13.226667-5.930667 13.226666-13.226666v-159.317334a13.269333 13.269333 0 0 0-13.226666-13.226666H229.845333a13.269333 13.269333 0 0 0-13.226666 13.226666v56.448z m415.104 0.426667H403.712V366.037333a13.269333 13.269333 0 0 0-13.269333-13.269333H325.802667a13.269333 13.269333 0 0 0-13.226667 13.226667v292.053333c0 7.338667 5.888 13.269333 13.226667 13.269333h64.64c7.338667 0 13.269333-5.930667 13.269333-13.226666v-123.306667h227.968v123.306667c0 7.296 5.930667 13.226667 13.226667 13.226666h64.64c7.338667 0 13.269333-5.930667 13.269333-13.226666V365.952a13.269333 13.269333 0 0 0-13.226667-13.269333h-64.64a13.269333 13.269333 0 0 0-13.269333 13.226666v123.306667z m187.093333-0.426667v-56.448a13.269333 13.269333 0 0 0-13.226666-13.226666h-42.965334a13.269333 13.269333 0 0 0-13.269333 13.226666v159.317334c0 7.296 5.973333 13.226667 13.269333 13.226666h42.922667c7.338667 0 13.269333-5.930667 13.269333-13.226666v-56.448h23.168v-46.421334h-23.168z</StreamGeometry>
<StreamGeometry x:Key="building_more">M511.9,276.3c43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2 -43.8,0 -79.2,35.5 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2zM511.9,434.8c-43.8,0 -79.2,35.5 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2 43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2zM511.9,751.8c-43.8,0 -79.2,35.4 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2 43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2z</StreamGeometry>
<StreamGeometry x:Key="building_delete">M809.984 169.984l0 86.016-596.010667 0 0-86.016 148.010667 0 43.989333-41.984 212.010667 0 43.989333 41.984 148.010667 0zM256 809.984l0-512 512 0 0 512q0 34.005333-25.984 59.989333t-59.989333 25.984l-340.010667 0q-34.005333 0-59.989333-25.984t-25.984-59.989333z</StreamGeometry>
<StreamGeometry x:Key="building_copy">M704 896v80c0 26.51-21.49 48-48 48H112c-26.51 0-48-21.49-48-48V240c0-26.51 21.49-48 48-48h144v592c0 61.758 50.242 112 112 112h336z m0-688V0H368c-26.51 0-48 21.49-48 48v736c0 26.51 21.49 48 48 48h544c26.51 0 48-21.49 48-48V256H752c-26.4 0-48-21.6-48-48z m241.942-62.058L814.058 14.058A48 48 0 0 0 780.118 0H768v192h192v-12.118a48 48 0 0 0-14.058-33.94z</StreamGeometry>
<StreamGeometry x:Key="building_refresh">M849.652671 679.144788l111.007233-174.965917-50.615794 0C905.498584 274.107915 717.720873 88.965218 486.575446 88.965218c-233.998405 0-423.716304 189.698456-423.716304 423.707095 0 233.998405 189.716876 423.715281 423.716304 423.715281 113.936959 0 217.278605-45.079708 293.440216-118.235868l-62.46568-108.306728c-55.750745 65.205071-138.455375 106.709347-230.974535 106.709347-167.843706 0-303.882032-136.039349-303.882032-303.883055S318.732763 208.788234 486.575446 208.788234c164.951843 0 298.899554 131.522476 303.44508 295.389614l-51.357691 0L849.652671 679.144788z</StreamGeometry>
<StreamGeometry x:Key="building_ping">M273.28 899.328c-6.4 6.4-16 9.6-25.6 9.6-6.4 0-12.8-3.2-18.56-6.4-102.4-85.76-162.56-209.92-162.56-343.68 0-245.12 200.32-445.44 445.44-445.44s445.44 200.32 445.44 445.44c0 133.76-56.96 257.92-162.56 343.68-12.16 12.8-34.56 9.6-44.16-3.2-12.8-12.8-9.6-35.2 3.2-44.8a377.152 377.152 0 0 0 136.96-292.48c0-209.92-172.16-382.08-382.08-382.08-206.72-3.2-378.88 168.96-378.88 378.88 0 114.56 51.2 222.72 140.16 295.68 12.8 12.8 16 32 3.2 44.8z m394.88-540.8c12.8-12.8 31.36-12.8 44.16 0 12.8 12.8 12.8 32 0 44.8l-138.88 138.88c1.28 5.12 2.56 10.88 2.56 16.64 0 35.2-28.8 64-64 64-5.76 0-11.52-1.28-16.64-2.56l-24.32 24.32c-6.4 6.4-12.8 9.6-22.4 9.6-9.6 0-16-3.2-22.4-9.6-12.8-12.8-12.8-31.36 0-44.16l24.32-24.96a69.76 69.76 0 0 1-1.92-16.64c0-35.2 28.16-63.36 63.36-63.36 5.76 0 11.52 0.64 16.64 1.92z</StreamGeometry>
</ResourceDictionary>
</Application.Resources>

<TrayIcon.Icons>
<TrayIcons>
Expand Down
Binary file removed v2rayN/v2rayN.Desktop/Assets/add.png
Binary file not shown.
Binary file removed v2rayN/v2rayN.Desktop/Assets/close.png
Binary file not shown.
Binary file removed v2rayN/v2rayN.Desktop/Assets/copy.png
Binary file not shown.
Binary file removed v2rayN/v2rayN.Desktop/Assets/delete.png
Binary file not shown.
Binary file removed v2rayN/v2rayN.Desktop/Assets/edit.png
Binary file not shown.
Binary file removed v2rayN/v2rayN.Desktop/Assets/fit.png
Binary file not shown.
Binary file removed v2rayN/v2rayN.Desktop/Assets/light.png
Binary file not shown.
Binary file removed v2rayN/v2rayN.Desktop/Assets/more.png
Binary file not shown.
Binary file removed v2rayN/v2rayN.Desktop/Assets/refresh.png
Binary file not shown.
8 changes: 4 additions & 4 deletions v2rayN/v2rayN.Desktop/Views/BackupAndRestoreView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
x:DataType="vms:BackupAndRestoreViewModel"
mc:Ignorable="d">

<DockPanel Margin="16">
<DockPanel Classes="Margin8">
<DockPanel Classes="Margin8" DockPanel.Dock="Bottom">
<TextBlock
Name="txtMsg"
Expand All @@ -21,7 +21,7 @@

<StackPanel>
<Border
Margin="0"
Margin="4"
VerticalAlignment="Center"
Theme="{StaticResource CardBorder}">

Expand Down Expand Up @@ -74,7 +74,7 @@
</Grid>
</Border>
<Border
Margin="0"
Margin="4"
VerticalAlignment="Center"
Theme="{StaticResource CardBorder}">
<Grid Classes="Margin8">
Expand Down Expand Up @@ -105,7 +105,7 @@
<PathIcon
Width="20"
Height="20"
Data="M511.9,276.3c43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2 -43.8,0 -79.2,35.5 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2zM511.9,434.8c-43.8,0 -79.2,35.5 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2 43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2zM511.9,751.8c-43.8,0 -79.2,35.4 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2 43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2z"
Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
<Button.Flyout>
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
x:DataType="vms:CheckUpdateViewModel"
mc:Ignorable="d">

<DockPanel Margin="16">
<DockPanel Classes="Margin8">
<StackPanel
HorizontalAlignment="Right"
Classes="Margin8"
Expand Down
15 changes: 8 additions & 7 deletions v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,18 @@

<Button
x:Name="btnConnectionCloseAll"
Width="24"
Height="24"
Width="30"
Height="30"
Margin="8,0"
Classes="Success"
Theme="{DynamicResource SolidButton}"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuConnectionCloseAll}">
<Button.Content>
<Image
Width="16"
Height="16"
Source="/Assets/delete.png" />
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_delete}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>

Expand Down
30 changes: 16 additions & 14 deletions v2rayN/v2rayN.Desktop/Views/ClashProxiesView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,35 @@

<Button
x:Name="menuProxiesReload"
Width="24"
Height="24"
Width="30"
Height="30"
Margin="8,0"
Classes="Success"
Theme="{DynamicResource SolidButton}"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProxiesReload}">
<Button.Content>
<Image
Width="16"
Height="16"
Source="/Assets/refresh.png" />
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_refresh}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>

<Button
x:Name="menuProxiesDelaytest"
Width="24"
Height="24"
Width="30"
Height="30"
Margin="8,0"
Classes="Success"
Theme="{DynamicResource SolidButton}"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProxiesDelaytest}">
<Button.Content>
<Image
Width="16"
Height="16"
Source="/Assets/light.png" />
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_ping}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>

Expand Down
30 changes: 16 additions & 14 deletions v2rayN/v2rayN.Desktop/Views/MsgView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,36 @@

<Button
x:Name="btnCopy"
Width="24"
Height="24"
Width="30"
Height="30"
Margin="8,0"
Classes="Success"
Click="menuMsgViewCopyAll_Click"
Theme="{DynamicResource SolidButton}"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewCopyAll}">
<Button.Content>
<Image
Width="16"
Height="16"
Source="/Assets/copy.png" />
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_copy}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<Button
x:Name="btnClear"
Width="24"
Height="24"
Width="30"
Height="30"
Margin="8,0"
Classes="Success"
Click="menuMsgViewClear_Click"
Theme="{DynamicResource SolidButton}"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewClear}">
<Button.Content>
<Image
Width="16"
Height="16"
Source="/Assets/delete.png" />
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_delete}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<TextBlock
Expand Down
35 changes: 19 additions & 16 deletions v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
Height="30"
Margin="4,0"
Classes="Success"
Theme="{DynamicResource SolidButton}"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuSubEdit}">
<Button.Content>
<Image
Width="20"
Height="20"
Source="/Assets/edit.png" />
<PathIcon
Width="24"
Height="24"
Data="{StaticResource building_edit}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<Button
Expand All @@ -45,28 +46,30 @@
Height="30"
Margin="4,0"
Classes="Success"
Theme="{DynamicResource SolidButton}"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuSubAdd}">
<Button.Content>
<Image
Width="20"
Height="20"
Source="/Assets/add.png" />
<PathIcon
Width="24"
Height="24"
Data="{StaticResource building_add}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<SplitButton
x:Name="btnAutofitColumnWidth"
Width="54"
Height="30"
Margin="20,0"
Classes="Success"
Theme="{DynamicResource SolidSplitButton}"
Classes="Tertiary"
Theme="{DynamicResource BorderlessSplitButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}">
<SplitButton.Content>
<Image
Width="20"
Height="20"
Source="/Assets/fit.png" />
<PathIcon
Width="24"
Height="24"
Data="{StaticResource building_fit}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</SplitButton.Content>
<SplitButton.Flyout>
<MenuFlyout>
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/v2rayN.Desktop/Views/ThemeSettingView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PathIcon
Width="20"
Height="20"
Data="M511.9,276.3c43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2 -43.8,0 -79.2,35.5 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2zM511.9,434.8c-43.8,0 -79.2,35.5 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2 43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2zM511.9,751.8c-43.8,0 -79.2,35.4 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2 43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2z"
Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
<Button.Flyout>
Expand Down

0 comments on commit b33f536

Please sign in to comment.