fix(qbz-qt): local albums route to the local view, and the detail-page parity round
**The empty album view.** Opening a local album from Library "All" landed on a blank page. The mixed feed hands Qobuz and local albums to the SAME card, and the card always called the catalog open — so a local id, which is a group key or a filesystem path, went to /album/get and came back 404. It was in the owner's log before this round as `get_album(/mnt/nas/…) returned 404`; what changed is that clearing the stale document turned "shows the previous album" into "shows nothing", which is how it surfaced. Routing now happens in open_album itself, using the predicate the feed already uses to route favourites, so every call site is covered at once instead of card by card. **Header atmosphere.** Both detail pages get Slint's two-band gradient, tinted from THIS page's artwork through the ported header_tint — not the now-playing ambient triad, which is a different subject with a different algorithm. **Artist page.** The catalog/library toggle existed but was broken: a hand-rolled copy of the shared tab bar whose delegate walked the wrong parent chain, so it threw on every evaluation and never took its active colours. It now mounts the shared control. Added the JUMP TO label, the tab-strip search with the client-side filter it drives, and the year under release-section albums. The Network panel ran the full window height and never auto-opened; it is bounded below the tab strip now and opens unless the content is constrained, as Slint does. The action circles were the wrong size with the wrong glyph colour and no overlay arm — which would have left them dark-on-dark once the gradient landed. **Quality in track rows.** The column rendered a bare tier; it carries the badge now, in the one shared row component every surface mounts. playlist_qt was the only producer not emitting the bit-depth line. **Skeletons hand over instead of disappearing.** They cleared when the PATH arrived, but the image still had to load and rasterize after that, so the placeholder vanished and left an empty cell. They now wait for the image to be ready. **Local covers.** Most local covers ARE already the scanner's thumbnail, but re-hashing their path produced a different filename, so each one was decoded, resized to its own size and re-encoded into a duplicate before being shown. That was most of the wait. cc
This commit is contained in:
29 files changed
+1776
-446
No files matched your search
@@ -1,39 +1,65 @@
|
||||
// QbzCircleAction — the on-surface circular header action (Slint
|
||||
// primitives/CircleAction.slint on-surface arm), consolidated in phase 22
|
||||
// from THREE copies (AlbumView.CircleBtn ≡ ArtistView.CircleBtn,
|
||||
// PlaylistView.CircleBtn = superset with the `primary` + `btnEnabled`
|
||||
// arms). 32px elevated disc + 1.5px muted ring (active = accent glyph);
|
||||
// `primary` = 40px accent disc (black glyph).
|
||||
// NOTE: the OVERLAY-palette circle buttons (on artwork) are the separate
|
||||
// CardOverlayButton.qml — different palette, deliberately not merged.
|
||||
// QbzCircleAction — the circular header action, BOTH arms of Slint
|
||||
// primitives/CircleAction.slint. Consolidated in phase 22 from THREE copies
|
||||
// (AlbumView.CircleBtn ≡ ArtistView.CircleBtn, PlaylistView.CircleBtn =
|
||||
// superset with the `primary` + `btnEnabled` arms).
|
||||
//
|
||||
// Numbers, read off primitives/CircleAction.slint:
|
||||
// :24 diameter — primary 44, secondary 32 (the hierarchy lives HERE, not
|
||||
// in the callers; the port had 40 and was uniformly small)
|
||||
// :66 glyph — primary 19, secondary 15
|
||||
// :48 ON-SURFACE arm (`overlay: false`, the default): primary = accent
|
||||
// disc, secondary = surface-elevated disc, hover/active surface-hover
|
||||
// :60 ring — border-strong (the port used border-muted)
|
||||
// :70 glyph tint — active accent; else primary WHITE, secondary
|
||||
// text-primary. The port painted the on-surface primary glyph BLACK,
|
||||
// which is the OTHER arm's colour.
|
||||
// :56 OVERLAY arm (`overlay: true`) — for buttons sitting on the dark
|
||||
// artwork atmosphere (the album / artist header once the header
|
||||
// gradient is on): primary = solid white disc with a BLACK glyph,
|
||||
// secondary = #ffffff24 fill (#ffffff3d hover/active), 1.5px
|
||||
// #ffffffcc ring, white glyph.
|
||||
// NOTE: the card hover-overlay circles are still the separate
|
||||
// CardOverlayButton.qml — same palette, different sizing contract.
|
||||
|
||||
import QtQuick
|
||||
import com.blitzfc.qbz
|
||||
import "../theme"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
property string name: ""
|
||||
property bool active: false
|
||||
property bool primary: false
|
||||
property bool btnEnabled: true
|
||||
/// Light-on-dark palette for a button painted over artwork/atmosphere
|
||||
/// (CircleAction.slint's default arm; `on-surface: false` there).
|
||||
property bool overlay: false
|
||||
signal clicked(var mouse)
|
||||
|
||||
QbzTheme { id: theme }
|
||||
|
||||
width: primary ? 40 : 32
|
||||
height: primary ? 40 : 32
|
||||
width: primary ? 44 : 32
|
||||
height: primary ? 44 : 32
|
||||
radius: width / 2
|
||||
color: primary ? (cbArea.containsMouse && btnEnabled ? theme.accentHover : theme.accent)
|
||||
: (cbArea.containsMouse || active) ? theme.surfaceHover : theme.surfaceElevated
|
||||
color: overlay
|
||||
? (primary
|
||||
? (cbArea.containsMouse && btnEnabled ? "#d6ffffff" : "#ffffff")
|
||||
: ((cbArea.containsMouse || active) ? "#3dffffff" : "#24ffffff"))
|
||||
: (primary
|
||||
? (cbArea.containsMouse && btnEnabled ? theme.accentHover : theme.accent)
|
||||
: ((cbArea.containsMouse || active) ? theme.surfaceHover : theme.surfaceElevated))
|
||||
border.width: primary ? 0 : 1.5
|
||||
border.color: theme.borderMuted
|
||||
border.color: overlay ? "#ccffffff" : theme.borderStrong
|
||||
opacity: btnEnabled ? 1.0 : 0.4
|
||||
QbzIcon {
|
||||
name: parent.name
|
||||
width: primary ? 20 : 15
|
||||
height: primary ? 20 : 15
|
||||
name: root.name
|
||||
width: root.primary ? 19 : 15
|
||||
height: root.primary ? 19 : 15
|
||||
anchors.centerIn: parent
|
||||
tintName: parent.primary ? "black" : (parent.active ? "accent" : "primary")
|
||||
// active wins in both arms; then: overlay primary = black glyph on
|
||||
// the white disc, everything else = the light/primary glyph.
|
||||
tintName: root.active ? "accent"
|
||||
: (root.overlay && root.primary ? "black" : "primary")
|
||||
}
|
||||
MouseArea {
|
||||
id: cbArea
|
||||
|
||||
Reference in new issue
Block a user