Unify primary button hover color and keep text color stable

This commit is contained in:
Meik
2026-03-05 13:06:17 +01:00
parent ab6cea7457
commit edf7e56fb6
4 changed files with 21 additions and 2 deletions

View File

@@ -1036,10 +1036,14 @@ namespace C4IT_CustomerPanel.libs
ApplyBackgroundDerivedResources(backgroundColor);
// Active/Inactive button colors must come directly from config (WebAPI), not be overridden by derived background shades.
System.Windows.Application.Current.Resources["activeButtonColor"] = new SolidColorBrush(
hasConfiguredActiveColor ? configuredActiveButtonColor : ConverterHelper.ColorConvertFromString(Properties.Resources.activeButtonColor));
Color activeButtonColor = hasConfiguredActiveColor
? configuredActiveButtonColor
: ConverterHelper.ColorConvertFromString(Properties.Resources.activeButtonColor);
System.Windows.Application.Current.Resources["activeButtonColor"] = new SolidColorBrush(activeButtonColor);
System.Windows.Application.Current.Resources["inactiveButtonColor"] = new SolidColorBrush(
hasConfiguredInactiveColor ? configuredInactiveButtonColor : ConverterHelper.ColorConvertFromString(Properties.Resources.inactiveButtonColor));
System.Windows.Application.Current.Resources["primaryActionHoverColor"] = new SolidColorBrush(
GetButtonHoverColor(activeButtonColor, 1.15));
ApplyHeaderDerivedResources(headerColor);
@@ -1056,6 +1060,8 @@ namespace C4IT_CustomerPanel.libs
ApplyBackgroundDerivedResources(fallbackBackground);
System.Windows.Application.Current.Resources["activeButtonColor"] = new SolidColorBrush(fallbackActive);
System.Windows.Application.Current.Resources["inactiveButtonColor"] = new SolidColorBrush(fallbackInactive);
System.Windows.Application.Current.Resources["primaryActionHoverColor"] = new SolidColorBrush(
GetButtonHoverColor(fallbackActive, 1.15));
ApplyHeaderDerivedResources(fallbackHeader);
}