quickshell: stop the vinyl animation when the media popup is closed

This commit is contained in:
rope 2026-08-19 13:24:49 +01:00
parent d7ea0978ec
commit a46dc6e95e

View file

@ -6304,14 +6304,30 @@ in
source: mediaCard.modelData.trackArtUrl
}
// paused (not stopped) so resuming
// picks up at the current angle
// running is gated on the popup, NOT
// left true: a paused animation is
// still a *running* one to Qt's
// animation driver, which holds the
// window in continuous-update mode
// a commit every vblank, drawing
// nothing. The bar's surface is the
// whole screen, so each of those
// commits makes Hyprland recomposite
// the entire output, which halved
// framerates in games. Once
// spotify-player became a daemon an
// MPRIS player is always present, so
// this card and this animation
// never went away.
// paused (not stopped) still applies
// while the popup is open, so play/
// pause resumes at the current angle
// instead of snapping back to 0.
NumberAnimation on rotation {
from: 0; to: 360
duration: 8000
loops: Animation.Infinite
running: true
running: calPopup.open
paused: !vinyl.spinning
}
}