mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-30 01:34:08 +00:00
Fix desktop profile column restore
This commit is contained in:
parent
3cd9225bd2
commit
99cda5272e
1 changed files with 6 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private Window? _window;
|
private Window? _window;
|
||||||
private static readonly string _tag = "ProfilesView";
|
private static readonly string _tag = "ProfilesView";
|
||||||
|
private const int MinRestoredColumnWidth = 20;
|
||||||
|
|
||||||
public ProfilesView()
|
public ProfilesView()
|
||||||
{
|
{
|
||||||
|
|
@ -420,11 +421,15 @@ public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
||||||
{
|
{
|
||||||
item2.IsVisible = false;
|
item2.IsVisible = false;
|
||||||
}
|
}
|
||||||
else
|
else if (item.Width >= MinRestoredColumnWidth)
|
||||||
{
|
{
|
||||||
item2.Width = new DataGridLength(item.Width, DataGridLengthUnitType.Pixel);
|
item2.Width = new DataGridLength(item.Width, DataGridLengthUnitType.Pixel);
|
||||||
item2.DisplayIndex = displayIndex++;
|
item2.DisplayIndex = displayIndex++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item2.DisplayIndex = displayIndex++;
|
||||||
|
}
|
||||||
if (item.Name.ToLower().StartsWith("to"))
|
if (item.Name.ToLower().StartsWith("to"))
|
||||||
{
|
{
|
||||||
item2.IsVisible = _config.GuiItem.EnableStatistics;
|
item2.IsVisible = _config.GuiItem.EnableStatistics;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue