diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-21 18:55:21 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-21 18:55:21 +0200 |
| commit | 761c1d31d80b3fd72602bb771f9eb2e86c31d20c (patch) | |
| tree | fa430f03a0b771a1b417306b7fad83395302b31f /desktop/island/Island.qml | |
| parent | 10ba628793bac9aa26b3ca5a9484b09d1b46e8b6 (diff) | |
| download | quickshell-761c1d31d80b3fd72602bb771f9eb2e86c31d20c.tar.gz quickshell-761c1d31d80b3fd72602bb771f9eb2e86c31d20c.zip | |
island: hide the media pill while the island is retracted
The pill faded to opacity 0 and slid off-screen with the rest of the
island, but its visible stayed true for as long as a player was playing
or paused. Its marquee animation is gated on pill.visible, so a title
too long to fit kept scrolling off-screen all session, and the island's
layer repainted every frame. Measured: the desktop shell sat at 42% of
a core while idle (253 CPU-minutes over 10 hours), and 0.3% after.
Opacity alone does not stop animations; visible does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/island/Island.qml')
| -rw-r--r-- | desktop/island/Island.qml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/desktop/island/Island.qml b/desktop/island/Island.qml index d5abf57..12f49ea 100644 --- a/desktop/island/Island.qml +++ b/desktop/island/Island.qml @@ -326,10 +326,14 @@ PanelWindow { } // While something plays or is paused; it sits left of the clock pill and - // follows it as the calendar widens it. + // follows it as the calendar widens it. Hidden outright while the island + // is retracted: opacity 0 alone leaves it visible, and its marquee then + // animated off-screen for as long as anything played, repainting the + // island every frame (measured at 42% of a core, idle). MediaPill { id: media - visible: Player.playing || Player.current?.playbackState === MprisPlaybackState.Paused + visible: win.reveal > 0 + && (Player.playing || Player.current?.playbackState === MprisPlaybackState.Paused) x: win.cx - width / 2 - (win.gap * 1.5 + clock.width + width / 2) * win.reveal y: -height + (win.top + height) * win.reveal opacity: Math.min(1, win.reveal * 2) |
