From 40fbbc7c58870bbe02a0d3079d826b8bce434c6f Mon Sep 17 00:00:00 2001 From: crazypeace Date: Sat, 9 Sep 2023 15:00:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=20=E8=AE=A2=E9=98=85/?= =?UTF-8?q?=E5=88=86=E7=BB=84=20=E6=98=BE=E7=A4=BA=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=E7=9A=84=E6=9C=80=E5=A4=A7=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免占用过大的窗口面积 https://github.com/2dust/v2rayN/issues/4224 --- v2rayN/v2rayN/Views/MainWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml b/v2rayN/v2rayN/Views/MainWindow.xaml index 1e731078..9ae651d9 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml +++ b/v2rayN/v2rayN/Views/MainWindow.xaml @@ -386,7 +386,7 @@ x:Name="lstGroup" FontSize="{DynamicResource StdFontSize}" ItemContainerStyle="{StaticResource MyChipListBoxItem}" - Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}"> + Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}" MaxHeight="120"> From 34c6c953ac9bad9292b24d4a898b4f28796da7c9 Mon Sep 17 00:00:00 2001 From: crazypeace Date: Sat, 9 Sep 2023 15:59:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=80=83=E8=99=91=E5=9C=A8=E6=9B=B4?= =?UTF-8?q?=E5=A4=A7=E7=9A=84=E5=B1=8F=E5=B9=95=E4=B8=8A=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=8E=A5=E5=8F=97=E6=9B=B4=E9=AB=98=E5=B0=BA=E5=AF=B8=E7=9A=84?= =?UTF-8?q?=E5=8D=A0=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://zelikk.blogspot.com/2023/09/v2rayn-lstgroup-maxheight.html --- v2rayN/v2rayN/Views/MainWindow.xaml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs index 9ff4bea0..b7ea9afb 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs @@ -36,6 +36,8 @@ namespace v2rayN.Views this.Height = SystemParameters.WorkArea.Height; } + lstGroup.MaxHeight = Math.Floor(SystemParameters.WorkArea.Height * 0.20 / 40) * 40; + _config = LazyConfig.Instance.GetConfig(); App.Current.SessionEnding += Current_SessionEnding;