Skip to content

Reset media marquee label when the scroll animation stops - #9120

Open
ya-luotao wants to merge 1 commit into
omacom:quattrofrom
ya-luotao:fix-media-marquee-label
Open

Reset media marquee label when the scroll animation stops#9120
ya-luotao wants to merge 1 commit into
omacom:quattrofrom
ya-luotao:fix-media-marquee-label

Conversation

@ya-luotao

Copy link
Copy Markdown

Problem

The media bar widget scrolls long titles with a NumberAnimation on x inside a clipped 180px item. When the marquee stops — a short title that fits replaces a long one, the player goes away and comes back, the popup opens, or the bar goes vertical — Qt leaves x at the last interpolated value instead of restoring it. The label ends up parked partly or fully outside the clip, so exactly the titles that fit show up as an empty gap next to the play glyph (#8991).

Fix

Reset labelText.x to 0 from scrollAnim's onRunningChanged whenever the animation stops. Every stop path flips running, Qt stops the underlying job before emitting the signal, and the animation reseeds x from from when it restarts, so scrolling behaviour is unchanged. Five-line diff, no restructuring.

Verification

  • test/shell.d/media-test.sh and test/shell.d/qml-text-format-test.sh pass; bar-widget-contract-test.sh skips without a compositor.
  • Not visually verified in a running shell (developed on macOS without Qt/Quickshell) — please check long→short title, popup open/close, and a vertical bar after omarchy-restart-shell.

Fixes #8991

🤖 Generated with Claude Code

https://claude.ai/code/session_01RrGftF1S6Xymu7Z58TRd3M

A stopped NumberAnimation leaves x wherever the marquee was, so a title
that fits (or the label under an open popup) could be parked outside the
clip and the widget rendered as a blank gap next to the play glyph.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrGftF1S6Xymu7Z58TRd3M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy.media bar widget renders blank: marquee leaves the label parked off-screen when the title fits

1 participant