diff --git a/Control/UserControls/Config/ThemeControl.xaml b/Control/UserControls/Config/ThemeControl.xaml
index ba48415..d22a810 100644
--- a/Control/UserControls/Config/ThemeControl.xaml
+++ b/Control/UserControls/Config/ThemeControl.xaml
@@ -2,9 +2,11 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel"
+ d:DataContext="{d:DesignInstance Type=viewmodel:AppConfig}"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:hc="https://handyorg.github.io/handycontrol"
- xmlns:cvt="clr-namespace:GeekDesk.Converts"
+ xmlns:cvt="clr-namespace:GeekDesk.Converts"
mc:Ignorable="d"
Background="Transparent"
d:DesignHeight="500" d:DesignWidth="450">
@@ -13,6 +15,7 @@
+
@@ -117,6 +120,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -206,22 +219,21 @@
-
-
-
+
+ -->
-
+
diff --git a/Control/UserControls/Config/ThemeControl.xaml.cs b/Control/UserControls/Config/ThemeControl.xaml.cs
index 55604a3..4dc4329 100644
--- a/Control/UserControls/Config/ThemeControl.xaml.cs
+++ b/Control/UserControls/Config/ThemeControl.xaml.cs
@@ -1,5 +1,6 @@
using GeekDesk.Constant;
using GeekDesk.Control.Other;
+using GeekDesk.Control.Windows;
using GeekDesk.Util;
using GeekDesk.ViewModel;
using Microsoft.Win32;
@@ -119,7 +120,8 @@ namespace GeekDesk.Control.UserControls.Config
default:
colorType = ColorType.TEXT_COLOR;break;
}
- ColorPanel.Visibility = Visibility.Visible;
+ MyColorPicker.Visibility = Visibility.Visible;
+ new ColorPickerWindow().Show();
}
///
@@ -216,7 +218,7 @@ namespace GeekDesk.Control.UserControls.Config
MethodInfo mi = type.GetMethod("ToggleButtonDropper_Click", InstanceBindFlags);
mi.Invoke(cp, new object[] { null, null });
}
- ColorPanel.Visibility = Visibility.Collapsed;
+ MyColorPicker.Visibility = Visibility.Collapsed;
}
public void BGStyle_Changed(object sender, RoutedEventArgs e)
diff --git a/Converts/Visibility2BooleanConverter.cs b/Converts/Visibility2BooleanConverter.cs
new file mode 100644
index 0000000..b7d81ff
--- /dev/null
+++ b/Converts/Visibility2BooleanConverter.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace GeekDesk.Converts
+{
+ internal class Visibility2BooleanConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if ((Visibility)value == Visibility.Visible)
+ {
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if ((bool)value)
+ {
+ return Visibility.Visible;
+ } else
+ {
+ return Visibility.Collapsed;
+ }
+ }
+ }
+}
diff --git a/MainWindow.xaml b/MainWindow.xaml
index f80c2d6..bed8d00 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -8,7 +8,8 @@
mc:Ignorable="d"
xmlns:cvt="clr-namespace:GeekDesk.Converts"
x:Name="window"
- xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:AppData}"
+ xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel"
+ d:DataContext="{d:DesignInstance Type=viewmodel:AppData}"
Title="GeekDesk"
MinWidth="600"
MinHeight="400"
@@ -63,6 +64,7 @@
@@ -82,7 +84,7 @@
-
+
diff --git a/ViewModel/AppConfig.cs b/ViewModel/AppConfig.cs
index 37cd230..16196e5 100644
--- a/ViewModel/AppConfig.cs
+++ b/ViewModel/AppConfig.cs
@@ -28,6 +28,7 @@ namespace GeekDesk.ViewModel
private int selectedMenuIndex = 0; //上次选中菜单索引
private bool followMouse = true; //面板跟随鼠标 默认是
private Visibility configIconVisible = Visibility.Visible; // 设置按钮是否显示
+ private Visibility titleLogoVisible = Visibility.Visible; // 标题logo是否显示
private AppHideType appHideType = AppHideType.START_EXE; //面板关闭方式 (默认启动程序后)
private bool startedShowPanel = true; //启动时是否显示主面板 默认显示
[field: NonSerialized]
@@ -82,6 +83,20 @@ namespace GeekDesk.ViewModel
#region GetSet
+
+ public Visibility TitleLogoVisible
+ {
+ get
+ {
+ return titleLogoVisible;
+ }
+ set
+ {
+ titleLogoVisible = value;
+ OnPropertyChanged("TitleLogoVisible");
+ }
+ }
+
public GradientBGParam GradientBGParam
{
get
@@ -103,6 +118,10 @@ namespace GeekDesk.ViewModel
{
get
{
+ if (bgStyle == 0)
+ {
+ bgStyle = (BGStyle)1;
+ }
return bgStyle;
}
set