From 25512d0d0025d0e82979f171cc61a42ed71493a6 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Sun, 14 Jun 2026 04:13:01 -0600 Subject: [PATCH] fix(slint): no background flicker on click-driven track change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refresh_now_playing_meta cleared ImmersiveState.bg-image (set default) on every track change; the async 300px decode+blur then re-set it a beat later, so the immersive atmosphere blanked then reappeared. Natural advances hid it (warm art), but a click (cover or next button) showed the flicker. Stop clearing bg-image on track change: the previous blurred ambient bg now persists until load_now_playing_artwork_large swaps in the new one — a brief stale blur is imperceptible; a blank is not. cc --- crates/qbz-slint/src/playback.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/qbz-slint/src/playback.rs b/crates/qbz-slint/src/playback.rs index 29a8e95b0..c09d88695 100644 --- a/crates/qbz-slint/src/playback.rs +++ b/crates/qbz-slint/src/playback.rs @@ -1484,8 +1484,12 @@ pub(crate) async fn refresh_now_playing_meta(runtime: &Runtime, weak: &slint::We // floating preview never shows the previous track while the new high-res // cover resolves. np.set_artwork_large(slint::Image::default()); - w.global::() - .set_bg_image(slint::Image::default()); + // Do NOT clear the immersive atmosphere bg here. Blanking it caused a + // visible BACKGROUND FLICKER on a click-driven track change (the async + // 300px decode + blur takes a beat, so the bg went blank then back). + // Let the previous blurred ambient bg persist until + // load_now_playing_artwork_large swaps in the new one — a brief stale + // blur is imperceptible; a blank/raw-cover fallback is not. }); load_now_playing_artwork(weak.clone(), bar_artwork);