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. 602
      v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml
  3. 19
      v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml
  4. 2
      v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml.cs
  5. 1
      v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs
  6. 18
      v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
  7. 3
      v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs
  8. 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>

602
v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml

File diff suppressed because it is too large Load Diff

19
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,13 +88,15 @@
</StackPanel>
</WrapPanel>
<TextBox
x:Name="txtnormalDNS"
VerticalAlignment="Stretch"
BorderThickness="1"
Classes="TextArea Margin8"
TextWrapping="Wrap"
Watermark="HTTP/SOCKS" />
<Grid Classes="Margin8">
<TextBox
x:Name="txtnormalDNS"
VerticalAlignment="Stretch"
BorderThickness="1"
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"

2
v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml.cs

@ -49,7 +49,7 @@ namespace v2rayN.Desktop.Views
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.ImportDefConfig4V2rayCmd, v => v.btnImportDefConfig4V2ray).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.ImportDefConfig4SingboxCmd, v => v.btnImportDefConfig4Singbox).DisposeWith(disposables);
});
});
}
private async Task<bool> UpdateViewHandler(EViewAction action, object? obj)

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