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:
13 files changed
+1606
-30
No files matched your search
@@ -44,8 +44,8 @@ pub struct UiPrefs {
|
||||
/// Streaming-quality key — one of `STREAMING_QUALITIES[*].key`.
|
||||
#[serde(default = "default_streaming_quality")]
|
||||
pub streaming_quality: String,
|
||||
/// Now-playing bar layout: `"new"` | `"classic"`. Maps to
|
||||
/// `ShellState.npb-mode` (0 / 1).
|
||||
/// Now-playing bar layout: `"new"` | `"classic"` | `"small"`. Maps to
|
||||
/// `ShellState.npb-mode` (0 / 1 / 2).
|
||||
#[serde(default = "default_npb_mode")]
|
||||
pub npb_mode: String,
|
||||
}
|
||||
@@ -68,10 +68,11 @@ impl Default for UiPrefs {
|
||||
}
|
||||
|
||||
/// Map a persisted npb-mode key to the `ShellState.npb-mode` int
|
||||
/// (New = 0, Classic = 1). Unknown keys fall back to New.
|
||||
/// (New = 0, Classic = 1, Small = 2). Unknown keys fall back to New.
|
||||
pub fn npb_mode_index(key: &str) -> i32 {
|
||||
match key {
|
||||
"classic" => 1,
|
||||
"small" => 2,
|
||||
_ => 0,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user