Browse Source

Improved UI for Desktop version

pull/5767/head
2dust 2 months ago
parent
commit
fde2a768cf
  1. 10
      v2rayN/v2rayN.Desktop/Styles/GlobalStyles.axaml
  2. 8
      v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml
  3. 5
      v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml
  4. 1
      v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs
  5. 18
      v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
  6. 3
      v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs
  7. 3
      v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml

10
v2rayN/v2rayN.Desktop/Styles/GlobalStyles.axaml

@ -6,18 +6,18 @@
</Design.PreviewWith>
<Style Selector="TextBlock.Margin8">
<Setter Property="Margin" Value="8" />
<Setter Property="Margin" Value="10" />
</Style>
<Style Selector="StackPanel.Margin8">
<Setter Property="Margin" Value="8" />
<Setter Property="Margin" Value="10" />
</Style>
<Style Selector="DockPanel.Margin8">
<Setter Property="Margin" Value="8" />
<Setter Property="Margin" Value="10" />
</Style>
<Style Selector="WrapPanel.Margin8">
<Setter Property="Margin" Value="8" />
<Setter Property="Margin" Value="10" />
</Style>
<Style Selector="Grid.Margin8">
<Setter Property="Margin" Value="8" />
<Setter Property="Margin" Value="10" />
</Style>
</Styles>

8
v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml

@ -115,7 +115,7 @@
Classes="Margin8" />
</Grid>
<Separator Grid.Row="1" Margin="0,2" />
<Separator Grid.Row="1" Margin="0,10" />
<Grid
x:Name="gridVMess"
@ -547,7 +547,7 @@
<Separator
x:Name="sepa2"
Grid.Row="3"
Margin="0,2" />
Margin="0,10" />
<Grid x:Name="gridTransport" Grid.Row="4">
<Grid.RowDefinitions>
@ -653,7 +653,7 @@
Text="{x:Static resx:ResUI.TbPath}" />
</Grid>
<Separator Grid.Row="5" Margin="0,2" />
<Separator Grid.Row="5" Margin="0,10" />
<Grid x:Name="gridTls" Grid.Row="6">
<Grid.RowDefinitions>
@ -835,7 +835,7 @@
HorizontalAlignment="Left"
Classes="Margin8" />
</Grid>
<Separator Grid.Row="8" Margin="0,2" />
<Separator Grid.Row="8" Margin="0,10" />
</Grid>
</ScrollViewer>
</DockPanel>

5
v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml

@ -33,7 +33,6 @@
</StackPanel>
<TabControl HorizontalContentAlignment="Left">
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreDns}">
<DockPanel Classes="Margin8">
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
@ -89,6 +88,7 @@
</StackPanel>
</WrapPanel>
<Grid Classes="Margin8">
<TextBox
x:Name="txtnormalDNS"
VerticalAlignment="Stretch"
@ -96,6 +96,7 @@
Classes="TextArea Margin8"
TextWrapping="Wrap"
Watermark="HTTP/SOCKS" />
</Grid>
</DockPanel>
</TabItem>
@ -148,6 +149,7 @@
<TextBox
x:Name="txtnormalDNS2"
Grid.Column="0"
Width="400"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
BorderThickness="1"
@ -160,6 +162,7 @@
<TextBox
x:Name="txttunDNS2"
Grid.Column="2"
Width="400"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
BorderThickness="1"

1
v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs

@ -116,6 +116,7 @@ namespace v2rayN.Desktop.Views
if (Utils.IsWindows())
{
this.Title = $"{Utils.GetVersion()} - {(IsAdministrator ? ResUI.RunAsAdmin : ResUI.NotRunAsAdmin)}";
menuGlobalHotkeySetting.IsVisible = false;
}
else
{

18
v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml

@ -370,7 +370,7 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!--
<TextBlock
Grid.Row="1"
Grid.Column="0"
@ -389,8 +389,7 @@
VerticalAlignment="Center"
Classes="Margin8"
Text="{x:Static resx:ResUI.TbSettingsStartBootTip}"
TextWrapping="Wrap" />
TextWrapping="Wrap" />-->
<TextBlock
Grid.Row="2"
Grid.Column="0"
@ -495,19 +494,6 @@
HorizontalAlignment="Left"
Classes="Margin8" />
<TextBlock
Grid.Row="10"
Grid.Column="0"
VerticalAlignment="Center"
Classes="Margin8"
Text="{x:Static resx:ResUI.TbSettingsEnableDragDropSort}" />
<ToggleSwitch
x:Name="togEnableDragDropSort"
Grid.Row="10"
Grid.Column="1"
HorizontalAlignment="Left"
Classes="Margin8" />
<TextBlock
Grid.Row="11"
Grid.Column="0"

3
v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs

@ -115,7 +115,7 @@ namespace v2rayN.Desktop.Views
this.Bind(ViewModel, vm => vm.hyDownMbps, v => v.txtDownMbps.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.enableFragment, v => v.togenableFragment.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.AutoRun, v => v.togAutoRun.IsChecked).DisposeWith(disposables);
//this.Bind(ViewModel, vm => vm.AutoRun, v => v.togAutoRun.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableStatistics, v => v.togEnableStatistics.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.KeepOlderDedupl, v => v.togKeepOlderDedupl.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.IgnoreGeoUpdateCore, v => v.togIgnoreGeoUpdateCore.IsChecked).DisposeWith(disposables);
@ -124,7 +124,6 @@ namespace v2rayN.Desktop.Views
this.Bind(ViewModel, vm => vm.EnableSecurityProtocolTls13, v => v.togEnableSecurityProtocolTls13.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.AutoHideStartup, v => v.togAutoHideStartup.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableCheckPreReleaseUpdate, v => v.togEnableCheckPreReleaseUpdate.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableDragDropSort, v => v.togEnableDragDropSort.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.AutoUpdateInterval, v => v.txtautoUpdateInterval.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.CurrentFontFamily, v => v.cmbcurrentFontFamily.SelectedValue).DisposeWith(disposables);

3
v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml

@ -82,7 +82,6 @@
AutoGenerateColumns="False"
BorderThickness="1"
CanUserResizeColumns="True"
CanUserSortColumns="False"
GridLinesVisibility="All"
HeadersVisibility="Column"
IsReadOnly="True"
@ -171,7 +170,7 @@
Width="100"
Binding="{Binding subRemarks}"
Header="{x:Static resx:ResUI.LvSubscription}" />
<DataGridTemplateColumn>
<DataGridTemplateColumn SortMemberPath="delay">
<DataGridTemplateColumn.Header>
<TextBlock Text="{x:Static resx:ResUI.LvTestDelay}" />
</DataGridTemplateColumn.Header>

Loading…
Cancel
Save