mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-30 01:34:08 +00:00
Update Avalonia to 12
This commit is contained in:
parent
05e349e45c
commit
5e523c069b
11 changed files with 36 additions and 35 deletions
|
|
@ -5,13 +5,13 @@
|
||||||
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
|
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="11.4.1" />
|
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="12.0.0" />
|
||||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.13" />
|
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="12.0.0" />
|
||||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.13" />
|
<PackageVersion Include="Avalonia.Desktop" Version="12.0.2" />
|
||||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.13" />
|
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.14" />
|
||||||
<PackageVersion Include="AwesomeAssertions" Version="9.4.0" />
|
<PackageVersion Include="AwesomeAssertions" Version="9.4.0" />
|
||||||
<PackageVersion Include="DialogHost.Avalonia" Version="0.11.0" />
|
<PackageVersion Include="DialogHost.Avalonia" Version="0.12.1" />
|
||||||
<PackageVersion Include="ReactiveUI.Avalonia" Version="11.4.12" />
|
<PackageVersion Include="ReactiveUI.Avalonia" Version="12.0.1" />
|
||||||
<PackageVersion Include="CliWrap" Version="3.10.1" />
|
<PackageVersion Include="CliWrap" Version="3.10.1" />
|
||||||
<PackageVersion Include="Downloader" Version="5.2.0" />
|
<PackageVersion Include="Downloader" Version="5.2.0" />
|
||||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.4.0" />
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.4.0" />
|
||||||
|
|
@ -21,9 +21,9 @@
|
||||||
<PackageVersion Include="ReactiveUI" Version="23.2.1" />
|
<PackageVersion Include="ReactiveUI" Version="23.2.1" />
|
||||||
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
|
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
|
||||||
<PackageVersion Include="ReactiveUI.WPF" Version="23.2.1" />
|
<PackageVersion Include="ReactiveUI.WPF" Version="23.2.1" />
|
||||||
<PackageVersion Include="Semi.Avalonia" Version="11.3.7.3" />
|
<PackageVersion Include="Semi.Avalonia" Version="12.0.1" />
|
||||||
<PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="11.2.0.2" />
|
<PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="12.0.0" />
|
||||||
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.3.7.3" />
|
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="12.0.0" />
|
||||||
<PackageVersion Include="NLog" Version="6.1.2" />
|
<PackageVersion Include="NLog" Version="6.1.2" />
|
||||||
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
||||||
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
|
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@ public class WindowBase<TViewModel> : ReactiveWindow<TViewModel> where TViewMode
|
||||||
Height = sizeItem.Height;
|
Height = sizeItem.Height;
|
||||||
|
|
||||||
var workingArea = (Screens.ScreenFromWindow(this) ?? Screens.Primary).WorkingArea;
|
var workingArea = (Screens.ScreenFromWindow(this) ?? Screens.Primary).WorkingArea;
|
||||||
var scaling = (Utils.IsMacOS() ? null : VisualRoot?.RenderScaling) ?? 1.0;
|
var scaling = Utils.IsMacOS() ? 1.0 : RenderScaling;
|
||||||
|
scaling = scaling > 0 ? scaling : 1.0;
|
||||||
|
|
||||||
var x = workingArea.X + ((workingArea.Width - (Width * scaling)) / 2);
|
var x = workingArea.X + ((workingArea.Width - (Width * scaling)) / 2);
|
||||||
var y = workingArea.Y + ((workingArea.Height - (Height * scaling)) / 2);
|
var y = workingArea.Y + ((workingArea.Height - (Height * scaling)) / 2);
|
||||||
|
|
|
||||||
|
|
@ -414,7 +414,7 @@
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="400"
|
Width="400"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
Watermark="1000-2000,3000,4000" />
|
PlaceholderText="1000-2000,3000,4000" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
|
|
@ -449,12 +449,12 @@
|
||||||
x:Name="txtUpMbps7"
|
x:Name="txtUpMbps7"
|
||||||
Width="90"
|
Width="90"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
Watermark="Up" />
|
PlaceholderText="Up" />
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="txtDownMbps7"
|
x:Name="txtDownMbps7"
|
||||||
Width="90"
|
Width="90"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
Watermark="Down" />
|
PlaceholderText="Down" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid
|
<Grid
|
||||||
|
|
@ -549,7 +549,7 @@
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="400"
|
Width="400"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
Watermark="2,3,4" />
|
PlaceholderText="2,3,4" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
|
|
@ -563,7 +563,7 @@
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="400"
|
Width="400"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
Watermark="Ipv4,Ipv6" />
|
PlaceholderText="Ipv4,Ipv6" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="5"
|
Grid.Row="5"
|
||||||
|
|
@ -578,7 +578,7 @@
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Watermark="1500" />
|
PlaceholderText="1500" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridAnytls"
|
x:Name="gridAnytls"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
Width="200"
|
Width="200"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Margin="{StaticResource MarginLr8}"
|
Margin="{StaticResource MarginLr8}"
|
||||||
Watermark="{x:Static resx:ResUI.ConnectionsHostFilterTitle}" />
|
PlaceholderText="{x:Static resx:ResUI.ConnectionsHostFilterTitle}" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnConnectionCloseAll"
|
x:Name="btnConnectionCloseAll"
|
||||||
|
|
|
||||||
|
|
@ -317,7 +317,7 @@
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Classes="TextArea"
|
Classes="TextArea"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Watermark="{x:Static resx:ResUI.TbDNSHostsConfig}" />
|
PlaceholderText="{x:Static resx:ResUI.TbDNSHostsConfig}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource MarginLr8}"
|
Margin="{StaticResource MarginLr8}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Watermark="{x:Static resx:ResUI.MsgFilterTitle}" />
|
PlaceholderText="{x:Static resx:ResUI.MsgFilterTitle}" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnCopy"
|
x:Name="btnCopy"
|
||||||
|
|
|
||||||
|
|
@ -305,12 +305,12 @@
|
||||||
x:Name="txtUpMbps"
|
x:Name="txtUpMbps"
|
||||||
Width="90"
|
Width="90"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
Watermark="Up" />
|
PlaceholderText="Up" />
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="txtDownMbps"
|
x:Name="txtDownMbps"
|
||||||
Width="90"
|
Width="90"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
Watermark="Down" />
|
PlaceholderText="Down" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
|
@ -338,7 +338,7 @@
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
Watermark="0.0.0.0" />
|
PlaceholderText="0.0.0.0" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="21"
|
Grid.Row="21"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
|
|
@ -723,7 +723,7 @@
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Watermark="proxy_set.sh" />
|
PlaceholderText="proxy_set.sh" />
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnBrowseCustomSystemProxyScriptPath"
|
x:Name="btnBrowseCustomSystemProxyScriptPath"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
|
|
@ -768,7 +768,7 @@
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Watermark="pac.txt" />
|
PlaceholderText="pac.txt" />
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnBrowseCustomSystemProxyPacPath"
|
x:Name="btnBrowseCustomSystemProxyPacPath"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
Margin="8,0"
|
Margin="8,0"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Text="{Binding ServerFilter, Mode=TwoWay}"
|
Text="{Binding ServerFilter, Mode=TwoWay}"
|
||||||
Watermark="{x:Static resx:ResUI.MsgServerTitle}" />
|
PlaceholderText="{x:Static resx:ResUI.MsgServerTitle}" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
|
|
||||||
<!-- Profiles grid -->
|
<!-- Profiles grid -->
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource MarginLr4}"
|
Margin="{StaticResource MarginLr4}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Watermark="{x:Static resx:ResUI.MsgServerTitle}" />
|
PlaceholderText="{x:Static resx:ResUI.MsgServerTitle}" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnAutofitColumnWidth"
|
x:Name="btnAutofitColumnWidth"
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Watermark="{x:Static resx:ResUI.SubUrlTips}" />
|
PlaceholderText="{x:Static resx:ResUI.SubUrlTips}" />
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
Classes="TextArea"
|
Classes="TextArea"
|
||||||
MinLines="4"
|
MinLines="4"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Watermark="{x:Static resx:ResUI.SubUrlTips}" />
|
PlaceholderText="{x:Static resx:ResUI.SubUrlTips}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Flyout>
|
</Flyout>
|
||||||
</Button.Flyout>
|
</Button.Flyout>
|
||||||
|
|
@ -128,7 +128,7 @@
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
DockPanel.Dock="Right"
|
DockPanel.Dock="Right"
|
||||||
Watermark="{x:Static resx:ResUI.SubUrlTips}" />
|
PlaceholderText="{x:Static resx:ResUI.SubUrlTips}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
|
|
@ -149,7 +149,7 @@
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Watermark="{x:Static resx:ResUI.SubUrlTips}" />
|
PlaceholderText="{x:Static resx:ResUI.SubUrlTips}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
|
|
@ -178,7 +178,7 @@
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Watermark="{x:Static resx:ResUI.SubUrlTips}" />
|
PlaceholderText="{x:Static resx:ResUI.SubUrlTips}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="8"
|
Grid.Row="8"
|
||||||
|
|
@ -206,7 +206,7 @@
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Watermark="{x:Static resx:ResUI.LvPrevProfileTip}" />
|
PlaceholderText="{x:Static resx:ResUI.LvPrevProfileTip}" />
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="9"
|
Grid.Row="9"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
|
|
@ -226,7 +226,7 @@
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Watermark="{x:Static resx:ResUI.LvPrevProfileTip}" />
|
PlaceholderText="{x:Static resx:ResUI.LvPrevProfileTip}" />
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="10"
|
Grid.Row="10"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
|
|
@ -248,7 +248,7 @@
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
ToolTip.Tip="{x:Static resx:ResUI.TipPreSocksPort}"
|
ToolTip.Tip="{x:Static resx:ResUI.TipPreSocksPort}"
|
||||||
Watermark="{x:Static resx:ResUI.TipPreSocksPort}" />
|
PlaceholderText="{x:Static resx:ResUI.TipPreSocksPort}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="12"
|
Grid.Row="12"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue