diff --git a/forms/configInfo.xaml b/forms/configInfo.xaml
index 35f8b05..701fd95 100644
--- a/forms/configInfo.xaml
+++ b/forms/configInfo.xaml
@@ -12,9 +12,12 @@
MinHeight="540"
MinWidth="840"
ResizeMode="NoResize"
+ WindowStyle="None"
+ AllowsTransparency="True"
UseLayoutRounding="True"
SnapsToDevicePixels="True"
- Background="{DynamicResource backgroundColor}"
+ KeyDown="ConfigInfo_KeyDown"
+ Background="Transparent"
Icon="/Customer Panel;component/Resources/icons/logo_CustomerPanel.ico">
+
@@ -119,10 +170,11 @@
-
+
+
@@ -138,10 +190,17 @@
+
= 0.55;
+ Color panelColor = BlendColor(baseColor, Colors.White, isLightBackground ? 0.06 : 0.08);
+ Color navColor = BlendColor(baseColor, Colors.Black, isLightBackground ? 0.06 : 0.08);
+ Color panelBorder = BlendColor(baseColor, isLightBackground ? Colors.Black : Colors.White, isLightBackground ? 0.16 : 0.22);
+ Color navBorder = BlendColor(baseColor, isLightBackground ? Colors.Black : Colors.White, isLightBackground ? 0.20 : 0.28);
+
+ Application.Current.Resources["backgroundColor"] = new SolidColorBrush(baseColor);
+ Application.Current.Resources["panelBackgroundColor"] = new SolidColorBrush(panelColor);
+ Application.Current.Resources["navigationRailColor"] = new SolidColorBrush(navColor);
+ Application.Current.Resources["panelBorderColor"] = new SolidColorBrush(panelBorder);
+ Application.Current.Resources["navigationRailBorderColor"] = new SolidColorBrush(navBorder);
+ }
+
public SolidColorBrush GetHeaderColor()
{
return (SolidColorBrush)System.Windows.Application.Current.Resources["headerColor"];
@@ -958,10 +989,15 @@ namespace C4IT_CustomerPanel.libs
{
try
{
- System.Windows.Application.Current.Resources["activeButtonColor"] = new SolidColorBrush((Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["activeButtonColor"]));
- System.Windows.Application.Current.Resources["inactiveButtonColor"] = new SolidColorBrush((Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["inactiveButtonColor"]));
- System.Windows.Application.Current.Resources["backgroundColor"] = new SolidColorBrush((Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["backgroundColor"]));
- System.Windows.Application.Current.Resources["headerColor"] = new SolidColorBrush((Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["headerColor"]));
+ Color activeColor = (Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["activeButtonColor"]);
+ Color inactiveColor = (Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["inactiveButtonColor"]);
+ Color backgroundColor = (Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["backgroundColor"]);
+ Color headerColor = (Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["headerColor"]);
+
+ System.Windows.Application.Current.Resources["activeButtonColor"] = new SolidColorBrush(activeColor);
+ System.Windows.Application.Current.Resources["inactiveButtonColor"] = new SolidColorBrush(inactiveColor);
+ System.Windows.Application.Current.Resources["headerColor"] = new SolidColorBrush(headerColor);
+ ApplyBackgroundDerivedResources(backgroundColor);
}
catch
{
@@ -969,6 +1005,16 @@ namespace C4IT_CustomerPanel.libs
cpConfig._uiColors["backgroundColor"] = Properties.Resources.backgroundColor;
cpConfig._uiColors["headerColor"] = Properties.Resources.headerColor;
cpConfig._uiColors["activeButtonColor"] = Properties.Resources.activeButtonColor;
+
+ Color fallbackActive = (Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["activeButtonColor"]);
+ Color fallbackInactive = (Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["inactiveButtonColor"]);
+ Color fallbackBackground = (Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["backgroundColor"]);
+ Color fallbackHeader = (Color)ConverterHelper.ColorConvertFromString(cpConfig._uiColors["headerColor"]);
+
+ System.Windows.Application.Current.Resources["activeButtonColor"] = new SolidColorBrush(fallbackActive);
+ System.Windows.Application.Current.Resources["inactiveButtonColor"] = new SolidColorBrush(fallbackInactive);
+ System.Windows.Application.Current.Resources["headerColor"] = new SolidColorBrush(fallbackHeader);
+ ApplyBackgroundDerivedResources(fallbackBackground);
}
try