From 6e58afcdea56e779db953d6a3e249bf741a29064 Mon Sep 17 00:00:00 2001 From: liufei Date: Tue, 14 Jun 2022 10:37:24 +0800 Subject: [PATCH] =?UTF-8?q?:recycle:=20=E4=BC=98=E5=8C=96=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E5=8F=8A=E9=83=A8=E5=88=86=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Control/UserControls/Config/AboutControl.xaml | 7 +++++- .../UserControls/Config/MotionControl.xaml | 10 +-------- .../UserControls/Config/MotionControl.xaml.cs | 8 ------- Control/UserControls/Config/ThemeControl.xaml | 22 +++++++++++++++++-- .../UserControls/Config/ThemeControl.xaml.cs | 11 ++++++++++ .../PannelCard/LeftCardControl.xaml.cs | 6 ++++- .../PannelCard/RightCardControl.xaml | 10 ++++----- Control/Windows/ConfigWindow.xaml | 2 +- Update.json | 2 +- Util/MarginHide.cs | 1 + ViewModel/AppConfig.cs | 14 ++++++++++++ 11 files changed, 65 insertions(+), 28 deletions(-) diff --git a/Control/UserControls/Config/AboutControl.xaml b/Control/UserControls/Config/AboutControl.xaml index a963f48..6bb384a 100644 --- a/Control/UserControls/Config/AboutControl.xaml +++ b/Control/UserControls/Config/AboutControl.xaml @@ -4,6 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cvt="clr-namespace:GeekDesk.Converts" + xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF" xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard" xmlns:hc="https://handyorg.github.io/handycontrol" mc:Ignorable="d" @@ -16,7 +17,11 @@ - + diff --git a/Control/UserControls/Config/MotionControl.xaml b/Control/UserControls/Config/MotionControl.xaml index 02e0a8b..cd272b5 100644 --- a/Control/UserControls/Config/MotionControl.xaml +++ b/Control/UserControls/Config/MotionControl.xaml @@ -84,15 +84,7 @@ - - - - - - - - - + diff --git a/Control/UserControls/Config/MotionControl.xaml.cs b/Control/UserControls/Config/MotionControl.xaml.cs index a3907de..da521c3 100644 --- a/Control/UserControls/Config/MotionControl.xaml.cs +++ b/Control/UserControls/Config/MotionControl.xaml.cs @@ -306,14 +306,6 @@ namespace GeekDesk.Control.UserControls.Config } } - private void Animation_Checked(object sender, RoutedEventArgs e) - { - if (MainWindow.mainWindow.Visibility == Visibility.Collapsed) - { - appConfig.IsShow = true; - } - appConfig.IsShow = null; - } /// diff --git a/Control/UserControls/Config/ThemeControl.xaml b/Control/UserControls/Config/ThemeControl.xaml index 10f1a5b..0159ffc 100644 --- a/Control/UserControls/Config/ThemeControl.xaml +++ b/Control/UserControls/Config/ThemeControl.xaml @@ -110,7 +110,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -120,7 +138,7 @@ - + diff --git a/Control/UserControls/Config/ThemeControl.xaml.cs b/Control/UserControls/Config/ThemeControl.xaml.cs index d1209bc..1f6ccad 100644 --- a/Control/UserControls/Config/ThemeControl.xaml.cs +++ b/Control/UserControls/Config/ThemeControl.xaml.cs @@ -157,5 +157,16 @@ namespace GeekDesk.Control.UserControls.Config GradientBGDialog gbg = new GradientBGDialog(); gbg.dialog = HandyControl.Controls.Dialog.Show(gbg, "ConfigWindowDialog"); } + + + private void Animation_Checked(object sender, RoutedEventArgs e) + { + if (MainWindow.mainWindow.Visibility == Visibility.Collapsed) + { + appConfig.IsShow = true; + } + appConfig.IsShow = null; + } + } } diff --git a/Control/UserControls/PannelCard/LeftCardControl.xaml.cs b/Control/UserControls/PannelCard/LeftCardControl.xaml.cs index eae8b49..ece408c 100644 --- a/Control/UserControls/PannelCard/LeftCardControl.xaml.cs +++ b/Control/UserControls/PannelCard/LeftCardControl.xaml.cs @@ -311,7 +311,11 @@ namespace GeekDesk.Control.UserControls.PannelCard { if (RunTimeStatus.IS_MENU_EDIT) return; - MainWindow.mainWindow.RightCard.WrapUFG.Visibility = Visibility.Collapsed; + if (appData.AppConfig.ItemSpradeAnimation) + { + //是否启用列表展开动画 + MainWindow.mainWindow.RightCard.WrapUFG.Visibility = Visibility.Collapsed; + } //设置对应菜单的图标列表 if (MenuListBox.SelectedIndex == -1) diff --git a/Control/UserControls/PannelCard/RightCardControl.xaml b/Control/UserControls/PannelCard/RightCardControl.xaml index 827d7c4..ae9d41a 100644 --- a/Control/UserControls/PannelCard/RightCardControl.xaml +++ b/Control/UserControls/PannelCard/RightCardControl.xaml @@ -112,11 +112,11 @@ - + - + diff --git a/Update.json b/Update.json index cb2183d..5e7cd9c 100644 --- a/Update.json +++ b/Update.json @@ -2,7 +2,7 @@ "title": "GeekDesk版本更新", "subTitle": "V2.5.10", "msgTitle": "本次更新内容如下", - "msg": "['依旧耗费了我大量精力开发,希望大家去给我点个免费的Star', '这个版本优化点很多, 大家可以自行探索, 另外征集新Logo的设计, 要求美观并能体现\\'极客\\'风格','本次重新打包了程序文件(文件目录更清爽了), 可以将旧版本根目录下的Data文件复制到新版本根目录, 然后使用新版本启动','增加可拖动图标到其它菜单的功能,取消了拖动时的动画','增加了数据备份功能','优化大部分动画','优化搜索功能(达到了可只用键盘或只用鼠标启动所需目标)','增加了相对路径(实验性,可能有bug)','增加列表加密功能(实验性,可能有bug)','其它已知问题修复']", + "msg": "['依旧耗费了我大量精力开发,希望大家去给我点个免费的Star', '这个版本有一些优化点, 大家可以自行探索, 另外征集新Logo的设计, 要求美观并能体现\\'极客\\'风格','本次重新打包了程序文件(文件目录更清爽了), 可以将旧版本根目录下的Data文件复制到新版本根目录, 然后使用新版本启动','增加可拖动图标到其它菜单的功能,取消了拖动时的动画','增加了列表展开动画的开关','增加了数据备份功能','优化大部分动画','优化搜索功能(达到了可只用键盘或只用鼠标启动所需目标)','增加了相对路径(实验性,可能有bug)','增加列表加密功能(实验性,可能有bug)','其它已知问题修复']", "githubUrl": "https://github.com/BookerLiu/GeekDesk/releases", "giteeUrl": "https://gitee.com/BookerLiu/GeekDesk/releases", "version": "2.5.10" diff --git a/Util/MarginHide.cs b/Util/MarginHide.cs index a16bbdd..a3d0c88 100644 --- a/Util/MarginHide.cs +++ b/Util/MarginHide.cs @@ -128,6 +128,7 @@ namespace GeekDesk.Util && mouseY >= windowTop && mouseY <= windowTop + windowHeight && IS_HIDE && window.Visibility != Visibility.Visible) { window.Visibility = Visibility.Visible; + App.DoEvents(); //上方显示 if (windowTop <= screenTop - showMarginWidth) { diff --git a/ViewModel/AppConfig.cs b/ViewModel/AppConfig.cs index d0a4401..a7e35f3 100644 --- a/ViewModel/AppConfig.cs +++ b/ViewModel/AppConfig.cs @@ -101,8 +101,22 @@ namespace GeekDesk.ViewModel private bool? isShow; + private bool itemSpradeAnimation; //列表展开动画 #region GetSet + public bool ItemSpradeAnimation + { + get + { + return itemSpradeAnimation; + } + set + { + itemSpradeAnimation = value; + OnPropertyChanged("ItemSpradeAnimation"); + } + } + public bool? IsShow { get