Skip to content

Commit

Permalink
Improved UI
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Oct 14, 2024
1 parent 019c69e commit bdae08b
Show file tree
Hide file tree
Showing 21 changed files with 515 additions and 520 deletions.
36 changes: 30 additions & 6 deletions v2rayN/v2rayN/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,47 @@

<conv:InverseBooleanConverter x:Key="InverseBooleanConverter" />
<Thickness
x:Key="ServerItemMargin"
x:Key="Margin4"
Bottom="4"
Left="4"
Right="4"
Top="4" />
<Thickness
x:Key="SettingItemMargin"
x:Key="Margin8"
Bottom="8"
Left="8"
Right="8"
Top="8" />
<Thickness
x:Key="OutlinedTextBoxDefaultPadding"
Bottom="12"
Left="16"
Right="12"
Top="12" />
Bottom="8"
Left="8"
Right="8"
Top="8" />
<Thickness
x:Key="MarginLeftRight4"
Bottom="0"
Left="4"
Right="4"
Top="0" />
<Thickness
x:Key="MarginLeftRight8"
Bottom="0"
Left="8"
Right="8"
Top="0" />
<Thickness
x:Key="MarginLeft8"
Bottom="0"
Left="8"
Right="0"
Top="0" />
<Thickness
x:Key="MarginRight8"
Bottom="0"
Left="0"
Right="8"
Top="0" />
<Style
x:Key="ModuleTitle"
BasedOn="{StaticResource MaterialDesignTextBlock}"
Expand Down
36 changes: 18 additions & 18 deletions v2rayN/v2rayN/Views/AddServer2Window.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">
<DockPanel Margin="{StaticResource Margin8}">
<StackPanel
Margin="4"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
Expand All @@ -37,7 +37,7 @@
<Button
x:Name="btnCancel"
Width="100"
Margin="8,0"
Margin="{StaticResource MarginLeftRight8}"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Expand Down Expand Up @@ -72,14 +72,14 @@
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="4"
Margin="{StaticResource Margin4}"
Style="{StaticResource ModuleTitle}"
Text="{x:Static resx:ResUI.menuServers}" />

<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="4"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbRemarks}" />
Expand All @@ -89,15 +89,15 @@
Grid.Row="1"
Grid.Column="1"
Width="400"
Margin="4"
Margin="{StaticResource Margin4}"
VerticalAlignment="Top"
AcceptsReturn="True"
Style="{StaticResource MyOutlinedTextBox}" />

<TextBlock
Grid.Row="2"
Grid.Column="0"
Margin="4"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbAddress}" />
Expand All @@ -106,7 +106,7 @@
Grid.Row="2"
Grid.Column="1"
Width="400"
Margin="4"
Margin="{StaticResource Margin4}"
VerticalAlignment="Top"
AcceptsReturn="True"
IsReadOnly="True"
Expand All @@ -118,20 +118,20 @@
Orientation="Horizontal">
<Button
x:Name="btnBrowse"
Margin="2,0"
Margin="{StaticResource MarginLeftRight4}"
Content="{x:Static resx:ResUI.TbBrowse}"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnEdit"
Margin="2,0"
Margin="{StaticResource MarginLeftRight4}"
Content="{x:Static resx:ResUI.TbEdit}"
Style="{StaticResource DefButton}" />
</StackPanel>

<TextBlock
Grid.Row="3"
Grid.Column="0"
Margin="4"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbCoreType}" />
Expand All @@ -140,26 +140,26 @@
Grid.Row="3"
Grid.Column="1"
Width="200"
Margin="4"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
MaxDropDownHeight="1000"
Style="{StaticResource MyOutlinedTextComboBox}" />

<TextBlock
Grid.Row="4"
Grid.Column="0"
Margin="4"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbDisplayLog}" />
<StackPanel
Grid.Row="4"
Grid.Column="1"
Margin="4"
Margin="{StaticResource Margin4}"
Orientation="Horizontal">
<ToggleButton x:Name="togDisplayLog" HorizontalAlignment="Left" />
<TextBlock
Margin="8,0"
Margin="{StaticResource MarginLeftRight8}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TipDisplayLog}" />
Expand All @@ -168,7 +168,7 @@
<TextBlock
Grid.Row="5"
Grid.Column="0"
Margin="4"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbPreSocksPort}" />
Expand All @@ -177,7 +177,7 @@
Grid.Row="5"
Grid.Column="1"
Width="200"
Margin="4"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
AcceptsReturn="True"
Style="{StaticResource MyOutlinedTextBox}" />
Expand All @@ -193,7 +193,7 @@
TextWrapping="Wrap" />
<TextBlock
Width="500"
Margin="8,0"
Margin="{StaticResource MarginLeftRight8}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.CustomServerTips}"
Expand Down
Loading

0 comments on commit bdae08b

Please sign in to comment.