From 6072832654f8a0d5d2b47fbe330fb14f6d75b590 Mon Sep 17 00:00:00 2001 From: BookerLiu Date: Mon, 17 Apr 2023 13:26:58 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Constant/WidthTypeEnum.cs | 1 + Control/UserControls/PannelCard/RightCardControl.xaml | 6 ++---- Converts/GetWidthByWWConvert.cs | 8 ++++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Constant/WidthTypeEnum.cs b/Constant/WidthTypeEnum.cs index b50130c..b9e0bfa 100644 --- a/Constant/WidthTypeEnum.cs +++ b/Constant/WidthTypeEnum.cs @@ -14,5 +14,6 @@ namespace GeekDesk.Constant RIGHT_CARD_HALF_TEXT = 3, //右侧托盘宽度的一半 再减去左侧图像宽度 RIGHT_CARD_20 = 4, //右侧托盘宽度 - 20 RIGHT_CARD_40 = 5, //右侧托盘宽度 - 40 + RIGHT_CARD_70 = 6, //右侧托盘宽度 - 70 } } diff --git a/Control/UserControls/PannelCard/RightCardControl.xaml b/Control/UserControls/PannelCard/RightCardControl.xaml index b6e1da2..724e696 100644 --- a/Control/UserControls/PannelCard/RightCardControl.xaml +++ b/Control/UserControls/PannelCard/RightCardControl.xaml @@ -186,9 +186,7 @@ > @@ -212,7 +210,7 @@ VirtualizingPanel.ScrollUnit="Pixel" Width="{Binding AppConfig.WindowWidth, Mode=OneWay, Converter={StaticResource GetWidthByWWConvert}, - ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD_40}}" + ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD_70}}" /> diff --git a/Converts/GetWidthByWWConvert.cs b/Converts/GetWidthByWWConvert.cs index bef3e32..7f2633d 100644 --- a/Converts/GetWidthByWWConvert.cs +++ b/Converts/GetWidthByWWConvert.cs @@ -34,6 +34,14 @@ namespace GeekDesk.Converts { return (config.WindowWidth - config.MenuCardWidth) - 20; } + else if (WidthTypeEnum.RIGHT_CARD_40 == type) + { + return (config.WindowWidth - config.MenuCardWidth) - 40; + } + else if (WidthTypeEnum.RIGHT_CARD_70 == type) + { + return (config.WindowWidth - config.MenuCardWidth) - 70; + } return config.WindowWidth; }