quickshell: stop the vinyl animation when the media popup is closed
This commit is contained in:
parent
d7ea0978ec
commit
a46dc6e95e
1 changed files with 19 additions and 3 deletions
|
|
@ -6304,14 +6304,30 @@ in
|
||||||
source: mediaCard.modelData.trackArtUrl
|
source: mediaCard.modelData.trackArtUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
// paused (not stopped) so resuming
|
// running is gated on the popup, NOT
|
||||||
// picks up at the current angle
|
// 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.
|
// instead of snapping back to 0.
|
||||||
NumberAnimation on rotation {
|
NumberAnimation on rotation {
|
||||||
from: 0; to: 360
|
from: 0; to: 360
|
||||||
duration: 8000
|
duration: 8000
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
running: true
|
running: calPopup.open
|
||||||
paused: !vinyl.spinning
|
paused: !vinyl.spinning
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue