fix(qt): the defects found smoking the playlist and My QBZ round
Un-following a Qobuz playlist left it in the sidebar and in My Library. toggle_follow called unsubscribe_playlist and settled the ownership snapshot and stopped there, so the row only left at the next full refetch. Both surfaces are patched directly now, in both directions: following from a card buys the metadata with one get_playlist rather than re-reading getUserPlaylists, which lags the write. The un-follow collapses a hearted-and-followed playlist to the one row the next load will actually produce instead of dropping it, because the local heart is a library.db flag that survives the unsubscribe — removing every row made it vanish and come back, which is the original complaint wearing the other shoe. The Plex mark on album cards was a hard-drive glyph tinted accent — a blue hard drive — and the three Qobuz kinds drew no badge at all. The badge now ports discover/AlbumCard.slint:326-354 exactly: 24x24 at radius 4 pinned bottom-right with a 6px inset, plex-logo untinted at 16, qobuz-logo at 18 (22 for a download), the purchase arm gold on its amber chip, hard-drive white at 14 for local only. The brand marks are plain Images: routing them through QbzIcon floods every pixel with the tint and flattens a logo to a silhouette. SourceIcon moves to controls/ since it is no longer local-only, and every other surface drawing a hard-drive was audited against its .slint. The local album detail loses the two nav chevrons above the art. They are a Tauri-era leftover from before the app had global navigation. My QBZ used a bespoke card in the grid. MyQbzDetailCard is deleted and the standard cards/AlbumCard is mounted with its overlay. localMode bundled four separate things — action routing, the heart, the pin and Block this album — so a multi-source container had to switch all four off together; it is split, and the catalog affordances now follow the ITEM. On a Qobuz cell the heart works through the shared favourite seam; on a track, playlist, local or Plex cell it is absent rather than dead. Row covers carry two rungs: the list keeps _50, the grid gets _600. Not the _230 that would merely cover a 200px card — the complaint was that the cover reads softer than a normal AlbumCard, and a normal AlbumCard is fed image.large, which IS _600. _200 is not a rung the CDN serves at all (it answers 404). The My QBZ grid sets reuseItems, and AlbumCard assigns to its own isFavorite and isPinned when toggled, which destroys the binding that fed them. A recycled delegate therefore showed the previous row's heart and the click added the new album while the glyph said remove. Restored with the Qt.binding idiom this port already uses on TrackCard, PlaylistCard and TrackRow. The details view no longer force-opens every row on entry, and the per-row open state persists. Library > Artists showed placeholders for nearly every portrait. The side panel never reported its artwork window — the one caller of libraryArtworkWindow is LibraryView.reportWindow, and the panel had no report call at all, so no key ever reached the resolver and artMap stayed empty for its rows. The rail now reports through that same path, with the section-header sentinel reportWindow already skips. Note the reference has no portrait fallback either: an artist Qobuz serves no image for is a placeholder on both sides. cc
This commit is contained in:
37 files changed
+2043
-506
No files matched your search
@@ -0,0 +1,133 @@
|
||||
// Per-source glyph — the QML port of `primitives/SourceGlyph.slint`. THE one
|
||||
// place this port draws a source mark: the version picker, the MyQBZ
|
||||
// collection-detail rows, the Discography Builder rows, the Local Library
|
||||
// album/track rows, the Library ALL list rows and the 24x24 card badges of
|
||||
// discover/AlbumCard.slint + discover/TrackCard.slint all mount it.
|
||||
//
|
||||
// Lives in controls/ (the port's "primitives") since 2026-07-31, because the
|
||||
// cards need it too and Slint keeps its counterpart in `primitives/`. Nothing
|
||||
// about it was ever Local-Library-specific.
|
||||
//
|
||||
// ── THE LOAD-BEARING RULE (SourceGlyph.slint:4-8) ─────────────────────────
|
||||
// The full-colour Qobuz and Plex logos render **UNTINTED**; only the
|
||||
// monochrome local hard-drive glyph is tinted. Slint states the reason out
|
||||
// loud: routing the logos through a tinting primitive "would turn the logos
|
||||
// into a flat accent silhouette — the bug this primitive replaces". `QbzIcon`
|
||||
// floods every pixel with its tint, so the logo arms deliberately do NOT go
|
||||
// through it — they are plain `Image`s.
|
||||
//
|
||||
// ── WHY THIS FILE USED TO LIE ─────────────────────────────────────────────
|
||||
// The port shipped with neither logo: `qobuz-logo-filled.svg` and
|
||||
// `plex-logo.svg` were never carried over from the Slint tree, so this
|
||||
// component substituted `cloud-download` for every Qobuz kind and a tinted
|
||||
// `hard-drive` for Plex — i.e. it drew "downloaded" and "local file" where the
|
||||
// design calls for two brand marks. Both assets now live in
|
||||
// `qml/assets/brand/`, which is where the untinted marks belong (the Discogs /
|
||||
// Last.fm / MusicBrainz marks are already there for the same reason).
|
||||
//
|
||||
// `qobuz_purchase` reuses the Qobuz mark GOLD (#eab308) — same glyph as a
|
||||
// download, the colour is what says "purchased". That is the ONE arm that
|
||||
// needs a tint on a multi-colour asset, so it is the one arm that uses an
|
||||
// effect; on a software renderer it degrades to the untinted mark rather than
|
||||
// to nothing.
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import com.blitzfc.qbz
|
||||
import "../theme"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
/// "local" | "qobuz" | "qobuz_download" | "qobuz_purchase" | "offline" |
|
||||
/// "plex" (anything else = local).
|
||||
///
|
||||
/// `"offline"` is the Qt port's word for the Slint's `qobuz_download`
|
||||
/// (src/local_rows.rs:223-229 `badge_source`, which folds `qobuz_download`
|
||||
/// AND `qobuz_purchase` into it); plain `"qobuz"` is what the Library ALL
|
||||
/// feed (library_qt.rs `FeedItem.source`) and the MyQBZ collection items
|
||||
/// carry. `SourceGlyph.slint:23` groups all of them with the downloads.
|
||||
property string kind: "local"
|
||||
|
||||
/// Size of the MONOCHROME local glyph — and the default for the two brand
|
||||
/// marks, because `album/LocalAlbumView.slint:24-26` draws all three kinds
|
||||
/// at a flat 14px (the version picker: the call site that sets nothing).
|
||||
property int glyphSize: 14
|
||||
/// Plex mark size; -1 = `glyphSize`. `SourceGlyph.slint:31` gives Plex the
|
||||
/// same 15px as the local glyph, while `AlbumListRow.slint:319` and both
|
||||
/// card badges give it 16px — hence a knob and not a rule.
|
||||
property int plexSize: -1
|
||||
/// Qobuz mark size; -1 = `glyphSize`. 16 in `SourceGlyph.slint:31` /
|
||||
/// `TrackRow.slint:722` / `AlbumListRow.slint:319`, 18 on the card badges,
|
||||
/// 22 for `qobuz_download` on `AlbumCard.slint:352` — the wordmark's
|
||||
/// proportions need the extra pixels.
|
||||
property int qobuzSize: -1
|
||||
/// Tint of the MONOCHROME local glyph. "secondary" = LocalAlbumView.slint:36;
|
||||
/// "muted" = SourceGlyph.slint:28, whose header calls the
|
||||
/// muted-never-accent rule load-bearing; "white" = the card badges
|
||||
/// (AlbumCard.slint:347 / TrackCard.slint:190), which sit on a near-black
|
||||
/// chip.
|
||||
property string localTint: "secondary"
|
||||
|
||||
readonly property bool isQobuz: kind === "qobuz" || kind === "qobuz_download"
|
||||
|| kind === "qobuz_purchase" || kind === "offline"
|
||||
readonly property bool isPlex: kind === "plex"
|
||||
readonly property bool isPurchase: kind === "qobuz_purchase"
|
||||
|
||||
width: root.isPlex
|
||||
? (root.plexSize < 0 ? root.glyphSize : root.plexSize)
|
||||
: (root.isQobuz
|
||||
? (root.qobuzSize < 0 ? root.glyphSize : root.qobuzSize)
|
||||
: root.glyphSize)
|
||||
height: width
|
||||
|
||||
readonly property string brandDir: "qrc:/qt/qml/com/blitzfc/qbz/qml/assets/brand/"
|
||||
|
||||
// --- The brand marks: UNTINTED, by rule -------------------------------
|
||||
Image {
|
||||
id: mark
|
||||
anchors.fill: parent
|
||||
visible: (root.isQobuz && !root.isPurchase) || root.isPlex
|
||||
source: root.isPlex ? root.brandDir + "plex-logo.svg"
|
||||
: root.brandDir + "qobuz-logo-filled.svg"
|
||||
fillMode: Image.PreserveAspectFit // SourceGlyph's `image-fit: contain`
|
||||
// Decode at the size actually drawn: these are a 512x512 and a
|
||||
// ~1000x1006 source rendered into 14-22px.
|
||||
sourceSize.width: root.width
|
||||
sourceSize.height: root.height
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
}
|
||||
|
||||
// --- Purchased: the same mark, gold ------------------------------------
|
||||
// The only arm that tints a multi-colour asset, so the only one that needs
|
||||
// an effect. `_noShaders` degrades to the plain mark — the source is still
|
||||
// legible, it just loses the "purchased" colour, which beats an empty cell.
|
||||
readonly property bool _noShaders: GraphicsInfo.api === GraphicsInfo.Software
|
||||
|| GraphicsInfo.api === GraphicsInfo.Null
|
||||
Image {
|
||||
id: purchaseMark
|
||||
anchors.fill: parent
|
||||
visible: root.isPurchase
|
||||
source: root.brandDir + "qobuz-logo-filled.svg"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
sourceSize.width: root.width
|
||||
sourceSize.height: root.height
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
layer.enabled: root.isPurchase && !root._noShaders
|
||||
layer.effect: MultiEffect {
|
||||
colorization: 1.0
|
||||
// SourceGlyph.slint:27 — the §8.7 purchase gold.
|
||||
colorizationColor: "#eab308"
|
||||
}
|
||||
}
|
||||
|
||||
// --- Local / anything else: the monochrome glyph, tinted ---------------
|
||||
QbzIcon {
|
||||
anchors.fill: parent
|
||||
visible: !root.isQobuz && !root.isPlex
|
||||
name: "hard-drive"
|
||||
tintName: root.localTint
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user