From 761c1d31d80b3fd72602bb771f9eb2e86c31d20c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 21 Oct 2026 18:55:21 +0200 Subject: 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 --- desktop/island/Island.qml | 8 ++++++-- 1 file 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) -- cgit v1.2.3