From 99cda5272ef11688dd8a7114079a6f05f6f9bf8b Mon Sep 17 00:00:00 2001 From: Vinny Date: Fri, 8 May 2026 07:35:38 +0300 Subject: [PATCH] Fix desktop profile column restore --- v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs index b025c114..21daddab 100644 --- a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs @@ -8,6 +8,7 @@ public partial class ProfilesView : ReactiveUserControl private static Config _config; private Window? _window; private static readonly string _tag = "ProfilesView"; + private const int MinRestoredColumnWidth = 20; public ProfilesView() { @@ -420,11 +421,15 @@ public partial class ProfilesView : ReactiveUserControl { item2.IsVisible = false; } - else + else if (item.Width >= MinRestoredColumnWidth) { item2.Width = new DataGridLength(item.Width, DataGridLengthUnitType.Pixel); item2.DisplayIndex = displayIndex++; } + else + { + item2.DisplayIndex = displayIndex++; + } if (item.Name.ToLower().StartsWith("to")) { item2.IsVisible = _config.GuiItem.EnableStatistics;