Wd.Button.Primary: add disabled / pressed / focus states
Some checks failed
CI / build-and-test (push) Has been cancelled

Primary button (Apply Changes, Save Preset, Confirm-Stop-All) had only an IsMouseOver trigger. Disabled state looked identical to enabled — confusing for the most-frequently-disabled button in the app.

- Disabled: drops to Wd.Accent.CyanMuted at 70% opacity + Text.Disabled foreground.

- Pressed: 85% opacity for the brief tap.

- IsKeyboardFocused: matches the hover treatment so tab-cycling lights it.
This commit is contained in:
Zac Gaetano 2026-05-10 13:36:27 -04:00
parent 1b759486c0
commit d8adb44a8f

View file

@ -214,6 +214,28 @@
<Setter TargetName="Bd" Property="Background" Value="{StaticResource Wd.Accent.CyanHover}"/>
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Wd.Accent.CyanHover}"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{StaticResource Wd.Accent.CyanHover}"/>
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Wd.Accent.CyanHover}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Bd" Property="Opacity" Value="0.85"/>
</Trigger>
<!--
Disabled state: ghost the cyan to a muted tone +
knock the foreground back. Without this trigger
the disabled Apply button looked just like the
enabled one (Apply Changes is the most-frequently
disabled button in the app — its state has to read
distinctly so the operator knows when changes are
pending vs. when nothing's queued to apply).
-->
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Bd" Property="Background" Value="{StaticResource Wd.Accent.CyanMuted}"/>
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Wd.Accent.CyanMuted}"/>
<Setter TargetName="Bd" Property="Opacity" Value="0.7"/>
<Setter Property="Foreground" Value="{StaticResource Wd.Text.Disabled}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>