Files
qbz/crates/qbz-slint/ui/miniplayer/MiniBits.slint
T
vicrodh c974b8a973 feat(slint): miniplayer — second borderless window with five surfaces
Port the Tauri MiniPlayer to a second Slint MiniPlayerWindow (not an
AppWindow morph). Borderless via the native no-frame property (Slint's
winit adapter re-applies decorations from no-frame on every realization,
so the attributes hook alone was undone); the vendored renderer gives the
transparent rounded floating card. First QBZ surface with no system
titlebar.

State is mirror-driven with no second poll loop: the existing 450ms
playback poll and the 30Hz lyrics tick each fan out one mirror call into
the mini's per-window globals (REQ-1), gating the expensive copies
(artwork / queue / lyric lines) on track-id change. The queue surface owns
a self-contained navigable model (current + full upcoming, not the 40-row
sidebar page), and per-row play routes remote-first and bails before
mutating local (REQ-2). Transport callbacks delegate to the main window's
already-wired remote-first handlers (zero duplication).

Surfaces: micro / compact / artwork / queue / lyrics (reuses
LyricsLinesView + LyricsState). Footer with pending-seek state, transport,
volume popover, and the hover-expand controls capsule (surface tabs +
background-blur toggle + move-drag + close). Optional static
artwork-derived background-blur backdrop. Lifecycle in src/miniplayer.rs
(create-once / enter / exit / close / per-surface geometry persistence /
winit hooks). Menu entry enabled in PlayerBar + PlayerBarSmall.

cc
2026-06-17 18:35:28 -06:00

45 lines
1.3 KiB
Plaintext

// Small shared bits for the miniplayer surfaces.
import { Theme } from "../foundation/semantic-colors.slint";
// Explicit "E" badge — used by the compact/artwork surfaces and the queue
// rows. Tauri renders the official explicit.svg mask at 13x13 / opacity 0.45;
// the rest of the Slint app uses a styled "E" everywhere, so we keep that for
// consistency, sized to the mini (13px, muted).
export component ExplicitBadge inherits Rectangle {
width: 13px;
height: 13px;
border-radius: 3px;
background: Theme.alpha-12;
Text {
text: "E";
color: Theme.alpha-55;
font-size: 8px;
font-weight: 600;
horizontal-alignment: center;
vertical-alignment: center;
}
}
// Cover image with a placeholder behind it. When the bound image is empty the
// Image renders transparent and the placeholder fill shows through, matching
// Tauri's bordered empty-art box.
export component CoverArt inherits Rectangle {
in property <image> source;
in property <length> radius: 7px;
border-radius: root.radius;
background: Theme.alpha-08;
border-width: 1px;
border-color: Theme.alpha-12;
clip: true;
Image {
source: root.source;
width: 100%;
height: 100%;
image-fit: cover;
}
}