Unify primary button hover color and keep text color stable
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user