darklinkpower/Harmony

Color on play button does not change (minor)

Closed this issue · 2 comments

Bug Description

I'm using the Harmony theme and trying to change the text colors with ThemeModifier. Everything changes except the Play button. It stays aqua. I've tested it on other themes, and it does change to the correct color. I've tried to modify the constants file, but it doesn't work.

HarmonyAqua
Default color theme
Thememodifier

To Reproduce

No response

Extensions log

No response

Screenshots

No response

It's not a bug. The style definition doesn't use the GlyphBrush resource since it is an animation and can't use it. If you want to change it, you need to modify it in the them files

<Style x:Key="PlayButtonViews" TargetType="{x:Type Button}">
<Setter Property="Background" Value="#4fe3c0" />
<Setter Property="Foreground" Value="{DynamicResource TextBrushDark}" />
<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="10,5,10,5" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid x:Name="Grid">
<Border x:Name="DefaultBorder" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"
Opacity="1" CornerRadius="{DynamicResource ControlCornerRadiusViewPlayButtons}"/>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="True" />
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="DefaultBorder" />
<Setter Property="Opacity" TargetName="Grid" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard TargetProperty="(Background).(SolidColorBrush.Color)">
<ColorAnimation To="#8CF6DD" Duration="0:0:0.2" FillBehavior="HoldEnd"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard TargetProperty="(Background).(SolidColorBrush.Color)">
<ColorAnimation To="#4fe3c0" Duration="0:0:0.2" FillBehavior="HoldEnd"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</Style.Triggers>
</Style>

Thank you for that! Much appreciated! Sorry to waste your time.