fix(purchases): draw the shared quality badge instead of the raw tier word

The purchase card and list row printed `qualityTier` as text ("hires")
under the artist, the one surface in the app that did. Use the same
icon-only QualityMini on the card and QualityBadgeFull on the row that
every other album card and list row draws, with the exact quality
(DSD64/DSD128, 24-bit / 96 kHz) in the badge's tooltip and detail line.

cc
This commit is contained in:
vicrodh committed 2026-09-01 23:44:43 -06:00
1 parent 66f49467f2
commit 0756e96940
2 files changed
+47 -41

No files matched your search

@@ -30,6 +30,7 @@
import QtQuick
import com.blitzfc.qbz
import "../../controls"
import "../../theme"
Item {
@@ -106,41 +107,44 @@ Item {
}
}
// --- Title / artist / quality ------------------------------------
Column {
// --- Title / artist + quality badge ------------------------------
// The SAME icon-only badge every other album card draws
// (cards/AlbumCard.qml): tier glyph, exact quality in its tooltip.
// The .slint printed the raw tier word ("hires") as a third text
// line, which is the one thing on this page no other surface does.
Row {
width: parent.width
spacing: 2
Text {
width: parent.width
height: 20
text: root.album.title || ""
color: theme.textPrimary
font.pixelSize: theme.fontBody
font.weight: theme.weightMedium
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
height: 40
spacing: theme.spacingSm
Column {
width: parent.width - (qBadge.visible ? qBadge.width + theme.spacingSm : 0)
anchors.verticalCenter: parent.verticalCenter
spacing: 2
Text {
width: parent.width
height: 20
text: root.album.title || ""
color: theme.textPrimary
font.pixelSize: theme.fontBody
font.weight: theme.weightMedium
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
Text {
width: parent.width
height: 17
text: root.album.artist || ""
color: theme.textMuted
font.pixelSize: theme.fontLegal
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
}
Text {
width: parent.width
height: 17
text: root.album.artist || ""
color: theme.textMuted
font.pixelSize: theme.fontLegal
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
// .slint:288 — the quality line is dropped entirely when the row
// carries no tier, rather than reserving an empty band.
Text {
visible: (root.album.qualityTier || "") !== ""
width: parent.width
height: visible ? 17 : 0
text: root.album.qualityTier || ""
color: theme.textSecondary
font.pixelSize: theme.fontLegal
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
QualityMini {
id: qBadge
tier: root.album.qualityTier || ""
label: root.album.qualityDetail || ""
anchors.verticalCenter: parent.verticalCenter
}
}
}
@@ -17,6 +17,7 @@
import QtQuick
import com.blitzfc.qbz
import "../../controls"
import "../../theme"
Rectangle {
@@ -116,16 +117,17 @@ Rectangle {
}
}
// Quality column.
Text {
// Quality column — the SAME badge the album list rows show
// (views/AlbumListRow.qml): tier label over the exact quality line.
Item {
width: 110
height: parent.height
text: root.album.qualityTier || ""
color: theme.textSecondary
font.pixelSize: theme.fontLegal
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
QualityBadgeFull {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
tier: root.album.qualityTier || ""
detail: root.album.qualityDetail || ""
}
}
// Purchase-date column.