The desktop version unified icon size

master
2dust 2025-02-20 14:32:38 +08:00
parent 2e6c82c851
commit 565697bc0b
10 changed files with 52 additions and 97 deletions

View File

@ -8,4 +8,6 @@
<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_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> <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>
<x:Double x:Key="IconButtonWidth">32</x:Double>
<x:Double x:Key="IconButtonHeight">32</x:Double>
</ResourceDictionary> </ResourceDictionary>

View File

@ -23,4 +23,9 @@
<Style Selector="DataGrid"> <Style Selector="DataGrid">
<Setter Property="RowHeight" Value="24" /> <Setter Property="RowHeight" Value="24" />
</Style> </Style>
<Style Selector="PathIcon">
<Setter Property="Width" Value="16" />
<Setter Property="Height" Value="16" />
</Style>
</Styles> </Styles>

View File

@ -1,4 +1,4 @@
<Window <Window
x:Class="v2rayN.Desktop.Views.AddServerWindow" x:Class="v2rayN.Desktop.Views.AddServerWindow"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@ -514,14 +514,12 @@
<Button <Button
x:Name="btnExtra" x:Name="btnExtra"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="10,0" Margin="10,0"
Theme="{DynamicResource BorderlessButton}"> Theme="{DynamicResource BorderlessButton}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon
Width="20"
Height="20"
Data="{StaticResource building_more}" Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" /> Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>

View File

@ -88,17 +88,13 @@
<TextBlock Classes="Margin8" Text="{x:Static resx:ResUI.menuRemoteBackupAndRestore}" /> <TextBlock Classes="Margin8" Text="{x:Static resx:ResUI.menuRemoteBackupAndRestore}" />
<Button <Button
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
MinWidth="30" MinWidth="{StaticResource IconButtonWidth}"
Margin="10,0" Margin="10,0"
Theme="{DynamicResource BorderlessButton}"> Theme="{DynamicResource BorderlessButton}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_more}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="20"
Height="20"
Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
<Button.Flyout> <Button.Flyout>
<Flyout> <Flyout>

View File

@ -27,35 +27,27 @@
<Button <Button
x:Name="btnConnectionCloseAll" x:Name="btnConnectionCloseAll"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="8,0" Margin="8,0"
Classes="Success" Classes="Success"
Theme="{DynamicResource BorderlessButton}" Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuConnectionCloseAll}"> ToolTip.Tip="{x:Static resx:ResUI.menuConnectionCloseAll}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_delete}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="20"
Height="20"
Data="{StaticResource building_delete}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
</Button> </Button>
<Button <Button
x:Name="btnAutofitColumnWidth" x:Name="btnAutofitColumnWidth"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="8,0" Margin="8,0"
Classes="Success" Classes="Success"
Theme="{DynamicResource BorderlessButton}" Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}"> ToolTip.Tip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_fit}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="20"
Height="20"
Data="{StaticResource building_fit}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
</Button> </Button>

View File

@ -50,35 +50,27 @@
<Button <Button
x:Name="menuProxiesReload" x:Name="menuProxiesReload"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="8,0" Margin="8,0"
Classes="Success" Classes="Success"
Theme="{DynamicResource BorderlessButton}" Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProxiesReload}"> ToolTip.Tip="{x:Static resx:ResUI.menuProxiesReload}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_refresh}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="20"
Height="20"
Data="{StaticResource building_refresh}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
</Button> </Button>
<Button <Button
x:Name="menuProxiesDelaytest" x:Name="menuProxiesDelaytest"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="8,0" Margin="8,0"
Classes="Success" Classes="Success"
Theme="{DynamicResource BorderlessButton}" Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProxiesDelaytest}"> ToolTip.Tip="{x:Static resx:ResUI.menuProxiesDelaytest}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_ping}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="20"
Height="20"
Data="{StaticResource building_ping}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
</Button> </Button>

View File

@ -24,36 +24,26 @@
<Button <Button
x:Name="btnCopy" x:Name="btnCopy"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="8,0" Margin="8,0"
Classes="Success" Classes="Success"
Click="menuMsgViewCopyAll_Click" Click="menuMsgViewCopyAll_Click"
Theme="{DynamicResource BorderlessButton}" Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewCopyAll}"> ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewCopyAll}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_copy}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="20"
Height="20"
Data="{StaticResource building_copy}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
</Button> </Button>
<Button <Button
x:Name="btnClear" x:Name="btnClear"
Width="30"
Height="30"
Margin="8,0" Margin="8,0"
Classes="Success" Classes="Success"
Click="menuMsgViewClear_Click" Click="menuMsgViewClear_Click"
Theme="{DynamicResource BorderlessButton}" Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewClear}"> ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewClear}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_delete}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="20"
Height="20"
Data="{StaticResource building_delete}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
</Button> </Button>
<TextBlock <TextBlock
@ -79,11 +69,11 @@
</WrapPanel> </WrapPanel>
<TextBox <TextBox
Name="txtMsg" Name="txtMsg"
VerticalAlignment="Stretch"
BorderThickness="0" BorderThickness="0"
Classes="TextArea" Classes="TextArea"
IsReadOnly="True" IsReadOnly="True"
TextAlignment="Left" TextAlignment="Left"
VerticalAlignment="Stretch"
TextWrapping="Wrap"> TextWrapping="Wrap">
<TextBox.ContextMenu> <TextBox.ContextMenu>
<ContextMenu> <ContextMenu>

View File

@ -32,51 +32,39 @@
<Button <Button
x:Name="btnEditSub" x:Name="btnEditSub"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="4,0" Margin="4,0"
Classes="Success" Classes="Success"
Theme="{DynamicResource BorderlessButton}" Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuSubEdit}"> ToolTip.Tip="{x:Static resx:ResUI.menuSubEdit}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_edit}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="24"
Height="24"
Data="{StaticResource building_edit}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
</Button> </Button>
<Button <Button
x:Name="btnAddSub" x:Name="btnAddSub"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="4,0" Margin="4,0"
Classes="Success" Classes="Success"
Theme="{DynamicResource BorderlessButton}" Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuSubAdd}"> ToolTip.Tip="{x:Static resx:ResUI.menuSubAdd}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_add}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="24"
Height="24"
Data="{StaticResource building_add}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
</Button> </Button>
<Button <Button
x:Name="btnAutofitColumnWidth" x:Name="btnAutofitColumnWidth"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="4,0" Margin="4,0"
Classes="Success" Classes="Success"
Theme="{DynamicResource BorderlessButton}" Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}"> ToolTip.Tip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_fit}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="24"
Height="24"
Data="{StaticResource building_fit}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
</Button> </Button>

View File

@ -74,16 +74,12 @@
<Button <Button
Grid.Row="2" Grid.Row="2"
Grid.Column="2" Grid.Column="2"
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="10,0" Margin="10,0"
Theme="{DynamicResource BorderlessButton}"> Theme="{DynamicResource BorderlessButton}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_more}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="20"
Height="20"
Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
<Button.Flyout> <Button.Flyout>
<Flyout> <Flyout>

View File

@ -1,4 +1,4 @@
<UserControl <UserControl
x:Class="v2rayN.Desktop.Views.ThemeSettingView" x:Class="v2rayN.Desktop.Views.ThemeSettingView"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@ -20,16 +20,12 @@
</UserControl.Styles> </UserControl.Styles>
<Button <Button
Width="30" Width="{StaticResource IconButtonWidth}"
Height="30" Height="{StaticResource IconButtonHeight}"
Margin="10,0" Margin="10,0"
Theme="{DynamicResource BorderlessButton}"> Theme="{DynamicResource BorderlessButton}">
<Button.Content> <Button.Content>
<PathIcon <PathIcon Data="{StaticResource building_more}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
Width="20"
Height="20"
Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content> </Button.Content>
<Button.Flyout> <Button.Flyout>
<Flyout> <Flyout>