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
@@ -119,7 +119,12 @@ export component PlayerBar inherits Rectangle {
|
||||
callback media-action(string, string, string);
|
||||
callback settings-bool(string, bool);
|
||||
|
||||
height: Layout.player-bar-height;
|
||||
// Mode-aware bar height: Small (npb-mode 2) collapses to one header-tall
|
||||
// row (42px); New/Classic keep the full 112px. Computed inline (not on the
|
||||
// Layout global) so `Layout` stays a pure leaf with no dependency on the
|
||||
// stateful ShellState — avoiding an import direction that would couple
|
||||
// foundation to state.
|
||||
height: ShellState.npb-mode == 2 ? Layout.header-height : Layout.player-bar-height;
|
||||
background: Theme.surface-card;
|
||||
|
||||
// Responsive column zones. The song-card (left) and the buttons (right)
|
||||
@@ -717,7 +722,7 @@ export component PlayerBar inherits Rectangle {
|
||||
ContextMenuItem {
|
||||
icon: @image-url("../assets/icons/rows-3.svg");
|
||||
label: @tr("Small");
|
||||
enabled: false;
|
||||
selected: ShellState.npb-mode == 2;
|
||||
clicked => {
|
||||
root.media-action("npb-view", "", "small");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user