feat(qbz-qt): Local Library complete — five tabs, routed album page, Plex
The view had roughly a folder tree and an album grid inside one 1,847-line file. Slint's is 2,671 lines across five tabs, and the local album detail is a routed page of its own. This closes that gap and splits the result: the view becomes a composition root over qml/views/local/ modules, and local_library_qt.rs becomes a narrow facade over local_* modules by concern. Plex is wired for real. The port hardcoded the cache path to None, so the union was local-only and Plex thumbnails were skipped. The settings store binds per user at session activation, the album and track union includes Plex, thumbnails resolve through the artwork path, rows carry their source badge, and the manual re-sync is on the toolbar behind the availability gate — as in Slint. Tabs: Albums with its quality/format/source filter popup, Tracks paginated, Folders in both flat and two-pane tree modes, Artists as an A-Z master/detail. Every list is windowed from the start, artwork id-keyed and evicted, because 16k tracks is exactly where the Slint build freezes. The tree grows a real select mode with its bulk bar, the ad-hoc "ephemeral folder" pane plays music that was never indexed, and the album page gets its version picker — a local album with two physical copies now switches between them without a database round-trip. Two agents built the QML and the Rust halves in parallel and the QML called thirty QbzLocal members that did not exist. QML resolves lazily, so each would have been a control that renders and does nothing; a static cross-reference caught them before a build ever ran, and they are implemented here. Deliberately logged seams, not half-paths: add-to-playlist, add-to-mixtape and the tag editor have no picker or modal in this port yet, and local favourites are not wired, so those actions log rather than route a local id into the Qobuz API. Plex playback downloads the part instead of range-streaming it, which is Slint's own documented fallback. cc
This commit is contained in:
47 files changed
+8116
-2968
No files matched your search
@@ -0,0 +1,45 @@
|
||||
// The app-wide selection checkbox (LocalLibraryView.slint:486-515): a 13px
|
||||
// circle, accent-filled when on, 1.5px muted ring when off, 8px white check
|
||||
// glyph — or a minus glyph for the folder tri-state "partial".
|
||||
//
|
||||
// Slint declares this inline inside TreeRow; the Qt port also needs it on
|
||||
// the album cards and the track rows in multi-select, so it is its own file
|
||||
// (three call sites, one shape).
|
||||
|
||||
import QtQuick
|
||||
import com.blitzfc.qbz
|
||||
import "../../theme"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property bool on: false
|
||||
property bool partial: false
|
||||
property int diameter: 13
|
||||
signal toggled()
|
||||
|
||||
QbzTheme { id: theme }
|
||||
|
||||
width: diameter
|
||||
height: diameter
|
||||
radius: diameter / 2
|
||||
color: (on || partial) ? theme.accent : "transparent"
|
||||
border.width: (on || partial) ? 0 : 1.5
|
||||
border.color: checkArea.containsMouse ? theme.textPrimary : theme.textMuted
|
||||
|
||||
QbzIcon {
|
||||
visible: root.on || root.partial
|
||||
name: root.partial ? "minus" : "check"
|
||||
width: Math.round(root.diameter * 0.62)
|
||||
height: Math.round(root.diameter * 0.62)
|
||||
anchors.centerIn: parent
|
||||
tintName: "primary"
|
||||
}
|
||||
MouseArea {
|
||||
id: checkArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root.toggled()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user