Improve UI

pull/5550/head
2dust 2024-07-24 19:51:13 +08:00
parent 35f3b5a50e
commit 1b09d95209
5 changed files with 155 additions and 53 deletions

View File

@ -1,11 +1,11 @@
<reactiveui:ReactiveUserControl <reactiveui:ReactiveUserControl
x:Class="v2rayN.Views.ClashConnectionsView" x:Class="v2rayN.Views.ClashConnectionsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:reactiveui="http://reactiveui.net"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:v2rayN.Resx" xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels" xmlns:vms="clr-namespace:v2rayN.ViewModels"
d:DesignHeight="450" d:DesignHeight="450"
@ -40,8 +40,8 @@
<Button <Button
x:Name="btnConnectionCloseAll" x:Name="btnConnectionCloseAll"
Width="30" Width="24"
Height="30" Height="24"
Margin="8,0" Margin="8,0"
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"> Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Close" /> <materialDesign:PackIcon VerticalAlignment="Center" Kind="Close" />

View File

@ -1,12 +1,12 @@
<reactiveui:ReactiveUserControl <reactiveui:ReactiveUserControl
x:Class="v2rayN.Views.ClashProxiesView" x:Class="v2rayN.Views.ClashProxiesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:reactiveui="http://reactiveui.net"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:converters="clr-namespace:v2rayN.Converters" xmlns:converters="clr-namespace:v2rayN.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:v2rayN.Resx" xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels" xmlns:vms="clr-namespace:v2rayN.ViewModels"
d:DesignHeight="450" d:DesignHeight="450"
@ -58,8 +58,8 @@
<Button <Button
x:Name="menuProxiesReload" x:Name="menuProxiesReload"
Width="30" Width="24"
Height="30" Height="24"
Margin="8,0" Margin="8,0"
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"> Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Reload" /> <materialDesign:PackIcon VerticalAlignment="Center" Kind="Reload" />
@ -67,8 +67,8 @@
<Button <Button
x:Name="menuProxiesDelaytest" x:Name="menuProxiesDelaytest"
Width="30" Width="24"
Height="30" Height="24"
Margin="8,0" Margin="8,0"
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"> Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="LightningBolt" /> <materialDesign:PackIcon VerticalAlignment="Center" Kind="LightningBolt" />

View File

@ -495,18 +495,122 @@
<TabControl <TabControl
x:Name="tabMain1" x:Name="tabMain1"
Grid.Row="2" Grid.Row="2"
HorizontalContentAlignment="Left"> materialDesign:NavigationRailAssist.ShowSelectionBackground="True"
<TabItem x:Name="tabMsgView1" Header="{x:Static resx:ResUI.MsgInformationTitle}" /> Style="{StaticResource MaterialDesignNavigationRailTabControl}"
<TabItem x:Name="tabClashProxies1" Header="{x:Static resx:ResUI.TbProxies}" /> TabStripPlacement="Left">
<TabItem x:Name="tabClashConnections1" Header="{x:Static resx:ResUI.TbConnections}" /> <TabItem x:Name="tabMsgView1">
<TabItem.Header>
<StackPanel>
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="MessageTextOutline" />
<TextBlock
HorizontalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.MsgInformationTitle}" />
</StackPanel>
</TabItem.Header>
</TabItem>
<TabItem x:Name="tabClashProxies1">
<TabItem.Header>
<StackPanel>
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="ArrowDecisionOutline" />
<TextBlock
HorizontalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbProxies}" />
</StackPanel>
</TabItem.Header>
</TabItem>
<TabItem x:Name="tabClashConnections1">
<TabItem.Header>
<StackPanel>
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="LanConnect" />
<TextBlock
HorizontalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbConnections}" />
</StackPanel>
</TabItem.Header>
</TabItem>
</TabControl> </TabControl>
</Grid> </Grid>
<Grid x:Name="gridMain2" Visibility="Collapsed"> <Grid x:Name="gridMain2" Visibility="Collapsed">
<TabControl x:Name="tabMain2" HorizontalContentAlignment="Left"> <TabControl
<TabItem x:Name="tabProfiles2" Header="{x:Static resx:ResUI.menuServers}" /> x:Name="tabMain2"
<TabItem x:Name="tabMsgView2" Header="{x:Static resx:ResUI.MsgInformationTitle}" /> materialDesign:NavigationRailAssist.ShowSelectionBackground="True"
<TabItem x:Name="tabClashProxies2" Header="{x:Static resx:ResUI.TbProxies}" /> Style="{StaticResource MaterialDesignNavigationRailTabControl}"
<TabItem x:Name="tabClashConnections2" Header="{x:Static resx:ResUI.TbConnections}" /> TabStripPlacement="Left">
<TabItem x:Name="tabProfiles2">
<TabItem.Header>
<StackPanel>
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="Server" />
<TextBlock
HorizontalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.menuServers}" />
</StackPanel>
</TabItem.Header>
</TabItem>
<TabItem x:Name="tabMsgView2">
<TabItem.Header>
<StackPanel>
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="MessageTextOutline" />
<TextBlock
HorizontalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.MsgInformationTitle}" />
</StackPanel>
</TabItem.Header>
</TabItem>
<TabItem x:Name="tabClashProxies2">
<TabItem.Header>
<StackPanel>
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="ArrowDecisionOutline" />
<TextBlock
HorizontalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbProxies}" />
</StackPanel>
</TabItem.Header>
</TabItem>
<TabItem x:Name="tabClashConnections2">
<TabItem.Header>
<StackPanel>
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="LanConnect" />
<TextBlock
HorizontalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbConnections}" />
</StackPanel>
</TabItem.Header>
</TabItem>
</TabControl> </TabControl>
</Grid> </Grid>
<materialDesign:Snackbar x:Name="MainSnackbar" MessageQueue="{materialDesign:MessageQueue}" /> <materialDesign:Snackbar x:Name="MainSnackbar" MessageQueue="{materialDesign:MessageQueue}" />

View File

@ -27,8 +27,8 @@
TextBoxBase.TextChanged="cmbMsgFilter_TextChanged" /> TextBoxBase.TextChanged="cmbMsgFilter_TextChanged" />
<Button <Button
x:Name="btnCopy" x:Name="btnCopy"
Width="30" Width="24"
Height="30" Height="24"
Margin="8,0" Margin="8,0"
Click="menuMsgViewCopyAll_Click" Click="menuMsgViewCopyAll_Click"
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"> Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
@ -36,8 +36,8 @@
</Button> </Button>
<Button <Button
x:Name="btnClear" x:Name="btnClear"
Width="30" Width="24"
Height="30" Height="24"
Margin="8,0" Margin="8,0"
Click="menuMsgViewClear_Click" Click="menuMsgViewClear_Click"
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"> Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">

View File

@ -853,34 +853,32 @@
<TabItem Header="{x:Static resx:ResUI.TbSettingsSystemproxy}"> <TabItem Header="{x:Static resx:ResUI.TbSettingsSystemproxy}">
<DockPanel Margin="{StaticResource SettingItemMargin}"> <DockPanel Margin="{StaticResource SettingItemMargin}">
<StackPanel DockPanel.Dock="Bottom" Orientation="Vertical"> <StackPanel DockPanel.Dock="Bottom" Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock <TextBlock
Grid.Row="3"
Grid.Column="0"
Margin="{StaticResource SettingItemMargin}" Margin="{StaticResource SettingItemMargin}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSettingsNotProxyLocalAddress}" /> Text="{x:Static resx:ResUI.TbSettingsNotProxyLocalAddress}" />
<ToggleButton <ToggleButton
x:Name="tognotProxyLocalAddress" x:Name="tognotProxyLocalAddress"
Grid.Row="3"
Grid.Column="1"
Margin="{StaticResource SettingItemMargin}" Margin="{StaticResource SettingItemMargin}"
HorizontalAlignment="Left" /> HorizontalAlignment="Left" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock <TextBlock
Grid.Row="4"
Margin="{StaticResource SettingItemMargin}" Margin="{StaticResource SettingItemMargin}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSettingsAdvancedProtocol}" /> Text="{x:Static resx:ResUI.TbSettingsAdvancedProtocol}" />
<ComboBox <ComboBox
x:Name="cmbsystemProxyAdvancedProtocol" x:Name="cmbsystemProxyAdvancedProtocol"
Grid.Row="5" MinWidth="400"
MinWidth="200"
Margin="{StaticResource SettingItemMargin}" Margin="{StaticResource SettingItemMargin}"
materialDesign:HintAssist.Hint="Protocol" materialDesign:HintAssist.Hint="Protocol"
Style="{StaticResource DefComboBox}" /> Style="{StaticResource DefComboBox}" />
</StackPanel> </StackPanel>
</StackPanel>
<TextBlock <TextBlock
Grid.Row="1" Grid.Row="1"