The desktop version unified icon size

This commit is contained in:
2dust
2025-02-20 14:32:38 +08:00
parent 2e6c82c851
commit 565697bc0b
10 changed files with 52 additions and 97 deletions
@@ -1,4 +1,4 @@
<Window
<Window
x:Class="v2rayN.Desktop.Views.AddServerWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -514,14 +514,12 @@
<Button
x:Name="btnExtra"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="10,0"
Theme="{DynamicResource BorderlessButton}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
@@ -756,4 +754,4 @@
</Grid>
</ScrollViewer>
</DockPanel>
</Window>
</Window>
@@ -88,17 +88,13 @@
<TextBlock Classes="Margin8" Text="{x:Static resx:ResUI.menuRemoteBackupAndRestore}" />
<Button
Width="30"
Height="30"
MinWidth="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
MinWidth="{StaticResource IconButtonWidth}"
Margin="10,0"
Theme="{DynamicResource BorderlessButton}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_more}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
<Button.Flyout>
<Flyout>
@@ -27,35 +27,27 @@
<Button
x:Name="btnConnectionCloseAll"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="8,0"
Classes="Success"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuConnectionCloseAll}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_delete}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_delete}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<Button
x:Name="btnAutofitColumnWidth"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="8,0"
Classes="Success"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_fit}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_fit}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
@@ -108,4 +100,4 @@
</DataGrid.Columns>
</DataGrid>
</DockPanel>
</UserControl>
</UserControl>
@@ -50,35 +50,27 @@
<Button
x:Name="menuProxiesReload"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="8,0"
Classes="Success"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProxiesReload}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_refresh}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_refresh}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<Button
x:Name="menuProxiesDelaytest"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="8,0"
Classes="Success"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProxiesDelaytest}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_ping}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_ping}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
@@ -168,4 +160,4 @@
</ListBox>
</DockPanel>
</DockPanel>
</UserControl>
</UserControl>
+6 -16
View File
@@ -24,36 +24,26 @@
<Button
x:Name="btnCopy"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="8,0"
Classes="Success"
Click="menuMsgViewCopyAll_Click"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewCopyAll}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_copy}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_copy}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<Button
x:Name="btnClear"
Width="30"
Height="30"
Margin="8,0"
Classes="Success"
Click="menuMsgViewClear_Click"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewClear}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_delete}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_delete}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<TextBlock
@@ -79,11 +69,11 @@
</WrapPanel>
<TextBox
Name="txtMsg"
VerticalAlignment="Stretch"
BorderThickness="0"
Classes="TextArea"
IsReadOnly="True"
TextAlignment="Left"
VerticalAlignment="Stretch"
TextWrapping="Wrap">
<TextBox.ContextMenu>
<ContextMenu>
@@ -107,4 +97,4 @@
</TextBox.ContextMenu>
</TextBox>
</DockPanel>
</UserControl>
</UserControl>
+9 -21
View File
@@ -32,51 +32,39 @@
<Button
x:Name="btnEditSub"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="4,0"
Classes="Success"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuSubEdit}">
<Button.Content>
<PathIcon
Width="24"
Height="24"
Data="{StaticResource building_edit}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_edit}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<Button
x:Name="btnAddSub"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="4,0"
Classes="Success"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuSubAdd}">
<Button.Content>
<PathIcon
Width="24"
Height="24"
Data="{StaticResource building_add}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_add}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<Button
x:Name="btnAutofitColumnWidth"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="4,0"
Classes="Success"
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}">
<Button.Content>
<PathIcon
Width="24"
Height="24"
Data="{StaticResource building_fit}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_fit}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
@@ -74,16 +74,12 @@
<Button
Grid.Row="2"
Grid.Column="2"
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="10,0"
Theme="{DynamicResource BorderlessButton}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_more}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
<Button.Flyout>
<Flyout>
@@ -1,4 +1,4 @@
<UserControl
<UserControl
x:Class="v2rayN.Desktop.Views.ThemeSettingView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -20,16 +20,12 @@
</UserControl.Styles>
<Button
Width="30"
Height="30"
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
Margin="10,0"
Theme="{DynamicResource BorderlessButton}">
<Button.Content>
<PathIcon
Width="20"
Height="20"
Data="{StaticResource building_more}"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
<PathIcon Data="{StaticResource building_more}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
<Button.Flyout>
<Flyout>
@@ -68,4 +64,4 @@
</Flyout>
</Button.Flyout>
</Button>
</UserControl>
</UserControl>