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
47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
// Miniplayer LYRICS surface — reuses the shared LyricsLinesView (which reads
|
|
// LyricsState internally) with mini sizing. Empty state mirrors Tauri
|
|
// MiniPlayerLyricsSurface.svelte (MicVocal + "No lyrics").
|
|
|
|
import { Theme } from "../foundation/semantic-colors.slint";
|
|
import { LyricsState } from "../state.slint";
|
|
import { LyricsLinesView } from "../shell/LyricsLinesView.slint";
|
|
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
|
|
|
export component MiniLyricsSurface inherits Rectangle {
|
|
property <bool> has-lines: LyricsState.lines.length > 0;
|
|
|
|
if !root.has-lines: VerticalLayout {
|
|
width: 100%;
|
|
height: 100%;
|
|
alignment: center;
|
|
spacing: 10px;
|
|
padding: 24px;
|
|
|
|
HorizontalLayout {
|
|
alignment: center;
|
|
QbzIcon {
|
|
source: @image-url("../assets/icons/mic-vocal.svg");
|
|
width: 30px;
|
|
height: 30px;
|
|
tint: Theme.text-muted;
|
|
}
|
|
}
|
|
Text {
|
|
text: @tr("No lyrics");
|
|
color: Theme.text-muted;
|
|
font-size: 13px;
|
|
horizontal-alignment: center;
|
|
}
|
|
}
|
|
|
|
if root.has-lines: LyricsLinesView {
|
|
width: 100%;
|
|
height: 100%;
|
|
side-padding: 18px;
|
|
line-gap: 10px;
|
|
size-inactive: 13px;
|
|
size-active: 15px;
|
|
show-attribution: false;
|
|
}
|
|
}
|