Unify primary button hover color and keep text color stable
This commit is contained in:
@@ -199,6 +199,17 @@
|
||||
Value="{DynamicResource activeButtonColor}" />
|
||||
<Setter Property="BorderBrush"
|
||||
Value="{DynamicResource activeButtonColor}" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver"
|
||||
Value="True">
|
||||
<Setter Property="Background"
|
||||
Value="{DynamicResource primaryActionHoverColor}" />
|
||||
<Setter Property="BorderBrush"
|
||||
Value="{DynamicResource primaryActionHoverColor}" />
|
||||
<Setter Property="Foreground"
|
||||
Value="{DynamicResource buttonTextColor}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="Button"
|
||||
x:Key="FlatButtonStyle2">
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,4 +42,5 @@
|
||||
<SolidColorBrush x:Key="itemHoverBorderColor" Color="#38BDF8"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="inactiveButtonColor" Color="#1E3552"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="activeButtonColor" Color="#38BDF8"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="primaryActionHoverColor" Color="#4CC7FC"></SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -42,4 +42,5 @@
|
||||
<SolidColorBrush x:Key="itemHoverBorderColor" Color="#1090E0"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="inactiveButtonColor" Color="#E3EBF6"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="activeButtonColor" Color="#1090E0"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="primaryActionHoverColor" Color="#0F83CC"></SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
|
||||
Reference in New Issue
Block a user