feat(slint): NowPlayingBar Mode C "Small" + mode shell + floating album-art preview

- New mode shell ui/shell/NowPlayingBar.slint switches on ShellState.npb-mode
  (0/1 -> existing PlayerBar untouched except a mode-aware height, 2 -> new
  PlayerBarSmall). AppShell mounts it; npb_mode "small" persists in ui_prefs.
- PlayerBarSmall: one 42px row (the album art defines the height, no bump) — a
  3px full-width top seekbar (SeekBar gains a show-times prop) + a symmetric
  3-column controls row that mirrors PlayerBar's responsive side-frac so the
  transport is window-centred. Compact SongCard (art border + flush-left +
  text-center + smaller fonts), a tabular 2-row time column (monospace), an
  inline 2-row AudioStamp (no format icon), and the right cluster
  (ViewMode/Connect/Cast/Lyrics/Settings-flyout/Volume/Queue). Responsive
  volume: inline QbzSlider when wide, an upward QbzVerticalSlider flyout when
  narrow.
- New ui/primitives/QbzVerticalSlider.slint.
- Floating album-art hover preview (1:1 Tauri): NowPlayingState.artwork-large
  (300px, loaded via the same source-aware artwork funnel) + a global
  ArtPreviewState rendered by the new ArtPreviewOverlay (an overlay, NOT a
  PopupWindow, so it never steals hover -> no flicker). New/Classic/Small.
- Fix: settings.rs handle_bool now refreshes SettingsState on the non-cascade
  path so the bar's Normalization/Gapless toggles reflect their real state
  (shared path, also helps New/Classic). Protected audio backend untouched.
- Context icon turntable -> layers (Tauri parity, all now-playing modes).

cc
This commit is contained in:
vicrodh committed 2026-06-12 13:18:54 -06:00
1 parent 3689a5fda8
commit 8fa03a8c03
13 files changed
+1606 -30

No files matched your search

+25
View File
@@ -2845,6 +2845,11 @@ export global NowPlayingState {
in property <string> album-id;
in property <string> artist-id;
in property <image> artwork;
// Higher-res cover (~300px) for the hover preview that floats above the
// now-playing bar's small art, so the ~220px popup is crisp instead of an
// upscale of the 160px bar art. Loaded alongside `artwork`; cleared on
// track change. Falls back to `artwork` in the UI until it resolves.
in property <image> artwork-large;
in property <string> track-id;
// True when the playing track is from an ephemeral folder (synthetic id):
// it has no DB row, so favorite / add-to-playlist / track-info are gated off.
@@ -2875,6 +2880,15 @@ export global NowPlayingState {
in property <string> quality-tier; // "hires" | "cd" | "mp3" | ""
in property <string> quality-detail; // "24-bit / 96 kHz"
// Output backend + mode LEDs (Mode C "Small" bar reads these). Mirror of
// the same four on SettingsState (:2154-2157) — surfaced here so the
// Small now-playing bar has ONE source for the song card + DAC/EXC
// cluster. Pushed on every audio snapshot-apply (src/settings.rs).
in property <string> output-backend-label: "SYST"; // PIPE|ALSA|JACK|PULS|SYST
in property <string> output-mode-label: "DEFAULT"; // DACPASS|BITPERF|EXCL|DIRECT|LOCKED|ROUTED|SHARED|DEFAULT
in property <bool> output-backend-active: false;
in property <bool> output-mode-active: false;
// Cast / render-aware state (Qobuz Connect). `is-remote` = a peer
// renderer owns playback (controls route to it); `volume-locked` =
// the active renderer disallows remote volume control. Both default
@@ -3046,6 +3060,17 @@ export global TooltipState {
in-out property <bool> show: false;
}
// Floating album-art preview (now-playing cover hover). Overlay-rendered like
// the tooltip so it NEVER steals hover from the trigger — a PopupWindow DID,
// which flipped the trigger's has-hover and made the preview flicker. The
// overlay reads the cover straight from NowPlayingState; this only carries the
// anchor + visibility.
export global ArtPreviewState {
in-out property <length> anchor-x; // art centre, window coords
in-out property <length> anchor-y; // art top, window coords
in-out property <bool> show: false;
}
// Playback queue model, for the Queue sidebar.
//
// The sidebar shows two tabs. The Queue tab renders `now-playing` plus a