feat(qt): album card quality badges reveal the exact quality on hover

QualityBadge has always owned a hover tooltip, but every AlbumCard host
passed only the tier, so the tip had nothing to say. The card gains a
qualityDetail input feeding the badge's label, and all fifteen mounts
now pass their model's detail (HomeCard rides its qualityLabel twin).
Un-hydrated Plex/remote rows surface their bare filetype — the known
honest fallback; an empty detail still shows no tooltip at all. The
Scene panel's own card already wired this and is untouched.

cc
This commit is contained in:
vicrodh committed 2026-08-30 19:55:48 -06:00
1 parent 0c28f9e64b
commit bbe8b6a0f2
10 files changed
+23 -1

No files matched your search

+9 -1
View File
@@ -41,6 +41,11 @@ Rectangle {
property string genre: ""
property string year: ""
property string qualityTier: ""
/// Exact stored quality ("24-bit / 96 kHz"), shown by the badge's hover
/// tooltip. Hosts whose model has no detail (un-hydrated Plex/remote
/// rows) may pass the bare filetype ("FLAC") — known limitation, and
/// still truthful; empty shows no tooltip at all.
property string qualityDetail: ""
property string ribbon: ""
property string ribbonKind: ""
// Artwork image source (file://… or "") — the host's cache lookup.
@@ -831,10 +836,13 @@ Rectangle {
elide: Text.ElideRight
}
}
// Icon-only quality badge (QualityBadge.slint).
// Icon-only quality badge (QualityBadge.slint). `label` feeds the
// badge's own hover tooltip with the exact stored quality; the
// badge shows nothing when the host has no detail to give.
QualityMini {
id: qBadge
tier: root.qualityTier
label: root.qualityDetail
anchors.verticalCenter: parent.verticalCenter
}
}
@@ -388,6 +388,7 @@ Column {
genre: gcell.modelData.genre
year: gcell.modelData.year
qualityTier: gcell.modelData.qualityTier
qualityDetail: gcell.modelData.qualityDetail || ""
ribbon: gcell.modelData.ribbon || ""
ribbonKind: gcell.modelData.ribbonKind || ""
artSource: root.artOf(gcell.modelData)
@@ -562,6 +563,7 @@ Column {
genre: cell.cardData.genre
year: cell.cardData.year
qualityTier: cell.cardData.qualityTier
qualityDetail: cell.cardData.qualityDetail || ""
ribbon: cell.cardData.ribbon || ""
ribbonKind: cell.cardData.ribbonKind || ""
artSource: root.artOf(cell.cardData)
+2
View File
@@ -607,6 +607,7 @@ Rectangle {
genre: modelData.genre
year: modelData.year
qualityTier: modelData.qualityTier
qualityDetail: modelData.qualityLabel || modelData.qualityDetail || ""
ribbon: modelData.ribbon
ribbonKind: modelData.ribbonKind
artSource: root.sectionArtOf(modelData)
@@ -1262,6 +1263,7 @@ Rectangle {
genre: modelData.album.genre
year: modelData.album.year
qualityTier: modelData.album.qualityTier
qualityDetail: modelData.album.qualityLabel || modelData.album.qualityDetail || ""
artSource: root.forYouArtOf(modelData.album)
artworkUrl: modelData.album.artUrl || ""
isPinned: modelData.album.isPinned === true
+1
View File
@@ -218,6 +218,7 @@ Rectangle {
genre: crCell.modelData.genre
year: crCell.modelData.year
qualityTier: crCell.modelData.qualityTier
qualityDetail: crCell.modelData.qualityDetail || ""
ribbon: crCell.modelData.ribbon || ""
ribbonKind: crCell.modelData.ribbonKind || ""
artSource: crCell.modelData.artPath || ""
+3
View File
@@ -351,6 +351,7 @@ Rectangle {
genre: resultCell.cardData.genre
year: resultCell.cardData.year
qualityTier: resultCell.cardData.qualityTier
qualityDetail: resultCell.cardData.qualityDetail || ""
artSource: resultCell.cardData.artPath || ""
isFavorite: resultCell.cardData.isFavorite === true
isPinned: resultCell.cardData.isPinned === true
@@ -757,6 +758,7 @@ Rectangle {
genre: (root.mp.album || ({})).genre || ""
year: (root.mp.album || ({})).year || ""
qualityTier: (root.mp.album || ({})).qualityTier || ""
qualityDetail: (root.mp.album || ({})).qualityDetail || ""
artSource: (root.mp.album || ({})).artPath || ""
// search_qt::map_album stamps the heart
// from fav_cache; false inverted the
@@ -879,6 +881,7 @@ Rectangle {
genre: modelData.genre
year: modelData.year
qualityTier: modelData.qualityTier
qualityDetail: modelData.qualityDetail || ""
artSource: modelData.artPath || ""
// search_qt::map_album stamps the heart
// from fav_cache; false made the glyph lie
+1
View File
@@ -63,6 +63,7 @@ Column {
genre: modelData.genre
year: modelData.year
qualityTier: modelData.qualityTier
qualityDetail: modelData.qualityDetail || ""
artSource: root.coverMap[modelData.artUrl] || ""
// The row carries the heart (home_qt / recommendations_qt
// stamp it from fav_cache at build time); hardcoding false
@@ -81,6 +81,7 @@ Item {
genre: cell.item.genre
year: cell.item.year
qualityTier: cell.item.qualityTier
qualityDetail: cell.item.qualityDetail || cell.item.qualityLabel || ""
artSource: cell.view.artMap[cell.item.artKey] || ""
isFavorite: cell.item.isFavorite
isPinned: cell.item.isPinned
@@ -436,6 +436,7 @@ Item {
genre: gcell.modelData.genre
year: gcell.modelData.year
qualityTier: gcell.modelData.qualityTier
qualityDetail: gcell.modelData.qualityDetail || ""
artSource: root.coverMap[gcell.modelData.artUrl] || ""
// The pin payload persists the REMOTE
// url, never the file:// cache path.
@@ -477,6 +477,7 @@ Item {
genre: ""
year: cardCell.slot.year
qualityTier: cardCell.slot.qualityTier
qualityDetail: cardCell.slot.qualityDetail || ""
artSource: cardCell.slot.artPath || (root.view
? (root.view.artMap[cardCell.slot.artKey] || "") : "")
pinArtworkUrl: artSource
@@ -957,6 +957,7 @@ Rectangle {
readonly property string cSubtitle: root.patchRev >= 0 ? (gcell.live.subtitle || "") : ""
readonly property string cYear: root.patchRev >= 0 ? (gcell.live.yearText || "") : ""
readonly property string cQuality: root.patchRev >= 0 ? (gcell.live.qualityTier || "") : ""
readonly property string cDetail: root.patchRev >= 0 ? (gcell.live.qualityDetail || "") : ""
/// The GRID rung of the cover, NOT the list row's.
/// `artPath` is the 50px thumbnail every list row draws
/// at 40px; this cell's artwork well is 200px, so
@@ -1084,6 +1085,7 @@ Rectangle {
genre: ""
year: gcell.cYear
qualityTier: gcell.cQuality
qualityDetail: gcell.cDetail
artSource: gcell.cArt
// The pin payload / block snapshot url (see
// `cArtUrl`). Without it a pinned My QBZ album