feat(slint): library/sidebar UX overhaul + theme switching + fixes

Shell & navigation:
- Three-state sidebar (open/mini/closed); collapse cycles via header button.
- Section nav as right-flyouts (sidebar) + compact header nav (closed) +
  full header tabs (nav-in-sidebar off), via a shared HeaderMenuOverlay.
- Collapsed-folder right-flyout popup (max 4 + scrollbar), Rust-populated.
- Thin auto-hiding sidebar scrollbar pinned to the edge (Flickable, drag-safe).
- Slack-style bezel: rounded inset content panel over surface-card chrome.
- Header restructure: nav buttons, window-centered search, app menu.

Themes & components:
- Live theme switching: Dark / OLED Black / Tokyo Night / System (std-widgets).
- SegmentedTabBar (Discovery-style) with count badges for Library + Local Library.
- MP3 quality-badge tier (format-first classification) across badges.
- QbzSelect (Group/Sort) trimmed 20px.

Behavior fixes:
- Artist + Local Library Folder cover art now reach the rendered (visible/
  grouped) models, not just the source set.
- Favorites Playlists/Labels random buttons.
- Playlist track click plays from the clicked track in visible order.
- Dropdown idle-close pauses while the cursor rests on the menu.

cc
This commit is contained in:
vicrodh committed 2026-05-30 15:40:35 -06:00
1 parent 201082d4a1
commit 682719cab0
27 files changed
+1495 -619

No files matched your search

+12
View File
@@ -2922,6 +2922,18 @@ impl LibraryDatabase {
Ok(tracks)
}
/// Cheap total local-track count — the Tracks-tab badge number without
/// materializing the (potentially 16K-row) table. Mirrors the Tracks tab
/// filter (include_qobuz_downloads = true, no network exclusion, no search)
/// so the badge equals the unfiltered list length.
pub fn count_all_local_tracks(&self) -> Result<u64, LibraryError> {
let n: i64 = self
.conn
.query_row("SELECT COUNT(*) FROM local_tracks", [], |row| row.get(0))
.map_err(|e| LibraryError::Database(e.to_string()))?;
Ok(n as u64)
}
/// Get library statistics
pub fn get_stats(&self, include_qobuz_downloads: bool) -> Result<LibraryStats, LibraryError> {
let source_filter = if include_qobuz_downloads {