diff --git a/v2rayN/v2rayN/Mode/ConfigItems.cs b/v2rayN/v2rayN/Mode/ConfigItems.cs index 2f60f0f5..991828c6 100644 --- a/v2rayN/v2rayN/Mode/ConfigItems.cs +++ b/v2rayN/v2rayN/Mode/ConfigItems.cs @@ -57,6 +57,8 @@ namespace v2rayN.Mode public bool enableAutoAdjustMainLvColWidth { get; set; } public double mainWidth { get; set; } public double mainHeight { get; set; } + public double mainGirdHeight1 { get; set; } + public double mainGirdHeight2 { get; set; } public bool colorModeDark { get; set; } public string? colorPrimaryName { get; set; } public string currentLanguage { get; set; } diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml b/v2rayN/v2rayN/Views/MainWindow.xaml index 11a4aeb2..57c2f072 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml +++ b/v2rayN/v2rayN/Views/MainWindow.xaml @@ -404,7 +404,7 @@ - + diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs index 75585148..2b49f13c 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs @@ -397,6 +397,11 @@ namespace v2rayN.Views { Height = SystemInformation.WorkingArea.Height * 96 / g.DpiY; } + if (_config.uiItem.mainGirdHeight1 > 0 && _config.uiItem.mainGirdHeight2 > 0) + { + gridMain.RowDefinitions[0].Height = new GridLength(_config.uiItem.mainGirdHeight1, GridUnitType.Star); + gridMain.RowDefinitions[2].Height = new GridLength(_config.uiItem.mainGirdHeight2, GridUnitType.Star); + } for (int k = 0; k < lstProfiles.Columns.Count; k++) { @@ -420,6 +425,8 @@ namespace v2rayN.Views { ConfigHandler.AddformMainLvColWidth(ref _config, ((EServerColName)k).ToString(), Convert.ToInt32(lstProfiles.Columns[k].ActualWidth)); } + _config.uiItem.mainGirdHeight1 = Math.Ceiling(gridMain.RowDefinitions[0].ActualHeight + 0.1); + _config.uiItem.mainGirdHeight2 = Math.Ceiling(gridMain.RowDefinitions[2].ActualHeight + 0.1); } private void AddHelpMenuItem()