From 5e523c069bb4d773a9e8bf2105d6e031b6b9e4b0 Mon Sep 17 00:00:00 2001 From: DHR60 Date: Wed, 8 Apr 2026 18:14:59 +0800 Subject: [PATCH] Update Avalonia to 12 --- v2rayN/Directory.Packages.props | 18 +++++++++--------- v2rayN/v2rayN.Desktop/App.axaml | 2 +- v2rayN/v2rayN.Desktop/Base/WindowBase.cs | 3 ++- .../v2rayN.Desktop/Views/AddServerWindow.axaml | 12 ++++++------ .../Views/ClashConnectionsView.axaml | 2 +- .../Views/DNSSettingWindow.axaml | 2 +- v2rayN/v2rayN.Desktop/Views/MsgView.axaml | 2 +- .../Views/OptionSettingWindow.axaml | 10 +++++----- .../Views/ProfilesSelectWindow.axaml | 2 +- v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml | 2 +- .../v2rayN.Desktop/Views/SubEditWindow.axaml | 16 ++++++++-------- 11 files changed, 36 insertions(+), 35 deletions(-) diff --git a/v2rayN/Directory.Packages.props b/v2rayN/Directory.Packages.props index 4cdb0ad7..36ee392d 100644 --- a/v2rayN/Directory.Packages.props +++ b/v2rayN/Directory.Packages.props @@ -5,13 +5,13 @@ false - - - - + + + + - - + + @@ -21,9 +21,9 @@ - - - + + + diff --git a/v2rayN/v2rayN.Desktop/App.axaml b/v2rayN/v2rayN.Desktop/App.axaml index 21204f60..3c90d152 100644 --- a/v2rayN/v2rayN.Desktop/App.axaml +++ b/v2rayN/v2rayN.Desktop/App.axaml @@ -8,7 +8,7 @@ xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib" Name="v2rayN" x:DataType="vms:StatusBarViewModel" - RequestedThemeVariant="Default"> + RequestedThemeVariant="Default"> diff --git a/v2rayN/v2rayN.Desktop/Base/WindowBase.cs b/v2rayN/v2rayN.Desktop/Base/WindowBase.cs index d1419b30..5bd67f48 100644 --- a/v2rayN/v2rayN.Desktop/Base/WindowBase.cs +++ b/v2rayN/v2rayN.Desktop/Base/WindowBase.cs @@ -26,7 +26,8 @@ public class WindowBase : ReactiveWindow where TViewMode Height = sizeItem.Height; 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 y = workingArea.Y + ((workingArea.Height - (Height * scaling)) / 2); diff --git a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml index 00bcff1b..e500022a 100644 --- a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml @@ -414,7 +414,7 @@ Grid.Column="1" Width="400" Margin="{StaticResource Margin4}" - Watermark="1000-2000,3000,4000" /> + PlaceholderText="1000-2000,3000,4000" /> + PlaceholderText="Up" /> + PlaceholderText="Down" /> + PlaceholderText="2,3,4" /> + PlaceholderText="Ipv4,Ipv6" /> + PlaceholderText="1500" /> + PlaceholderText="{x:Static resx:ResUI.ConnectionsHostFilterTitle}" />