Skip to content

Fix Play/Pause button losing album art accent color on hover and press - #1118

Merged
unchihugo merged 2 commits into
unchihugo:masterfrom
lgc2333:fix/playpause-accent-hover
Sep 22, 2026
Merged

unchihugo merged 2 commits into
unchihugo:masterfrom
lgc2333:fix/playpause-accent-hover

Conversation

@lgc2333

@lgc2333 lgc2333 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Keep the album art accent color on the play/pause button in hover and pressed states instead of switching to the system accent shade.

Motivation

Closes #910. Supersedes #913.

Type of Change

  • Feature
  • Bug fix
  • Refactor (no functional changes)
  • Style (formatting, naming)
  • Other

What Changed

  • Added PlayPauseButtonStyle in MainWindow.xaml, based on MicaWPF.Styles.AccentedButton, keeping the same GradientBorder template but replacing the MouseOver/Pressed visual-state color animations with opacity triggers (IsMouseOver → 0.9, IsPressed → 0.8).
  • ControlPlayPause now uses that style.

Additional Information

Root cause: the AccentedButton template animates ContentBorder.Background.Color to AccentFillColorSecondary/Tertiary in the MouseOver/Pressed visual states. Animations outrank the local Background set by UpdateUI, so the album art color only survived in the normal state — hover/press fell back to the system accent, and disabled used AccentFillColorDisabled.

Why not #913's approach: it replaces GradientBorder with a plain Border, losing the accent inner stroke and the Margin="-2" extension, so the button renders smaller and flatter than the other AccentedButtons; it also strips the file BOM and is based on stale code (already conflicting). This PR keeps the original template and only removes the color animation. The opacity values match Fluent's own accent hover/press fills (0.9/0.8), so hover intensity is unchanged; disabled keeps the album art color dimmed by the existing Opacity = 0.35.

Checklist

  • Code changes are manually tested and working.
  • Formatting and naming are consistent with the project.
  • Self-review of changes is done.
  • AI tools were used (if yes, I reviewed and fully understand the changes myself).

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot added the MainWindow / Media Flyout Changes to MainWindow including the Media Flyout label Sep 8, 2026
@lgc2333

lgc2333 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

I have read and agree to the FluentFlyout CLA

@lgc2333

lgc2333 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

hi, @unchihugo , the CLA issue has not been resolved

@unchihugo

unchihugo commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

Should be fixed now, sorry

Edit: ignore it for now!

@unchihugo

Copy link
Copy Markdown
Owner

Hi @lgc2333, could you make it so that opacity is only changed for the background? Currently, the symbol/icon is also adjusted, and is the reason why I couldn't merge the referenced PR either.

github-actions Bot added a commit that referenced this pull request Sep 8, 2026
@lgc2333

lgc2333 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

commited by agent hosted on cloud, haven't tested yet

@lgc2333
lgc2333 force-pushed the fix/playpause-accent-hover branch from f86b400 to 249ef6e Compare September 8, 2026 20:01
@lgc2333

lgc2333 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

hi, it's looking fine now

image image image

original behavior for comparing (using windows system accent):

image image image

@lgc2333

lgc2333 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

hi, just a friendly reminder because there's no response for a while. review this if you have time :)

@unchihugo

Copy link
Copy Markdown
Owner

Hi @lgc2333, I don't have access to a PC right now, so could you show the same hover behaviors currently in master compared to your branch?

@lgc2333

lgc2333 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

combine image 1, 5, 6, it's the original behavior

…ly opaque

Addresses review feedback: the hover/pressed opacity was applied to the
ContentBorder element, which also dimmed the play/pause symbol icon.
Move the ContentPresenter out of the ContentBorder as a sibling layer so
the opacity triggers only affect the background.
@lgc2333
lgc2333 force-pushed the fix/playpause-accent-hover branch from 249ef6e to 672f9c0 Compare September 18, 2026 14:13
@lgc2333

lgc2333 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Bump for review. Anything blocking this?

@unchihugo

Copy link
Copy Markdown
Owner

Hi @lgc2333, I was busy. Will merge now!

@unchihugo
unchihugo merged commit 9e58431 into unchihugo:master Sep 22, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

MainWindow / Media Flyout Changes to MainWindow including the Media Flyout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Album art accent color not applied to media flyout pause button on hover.

2 participants