From 0756e969406a3587d58134efe1183125ab74fbf7 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 1 Sep 2026 23:44:43 -0600 Subject: [PATCH] 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 --- .../qml/views/purchases/PurchaseGridCard.qml | 70 ++++++++++--------- .../qml/views/purchases/PurchaseListRow.qml | 18 ++--- 2 files changed, 47 insertions(+), 41 deletions(-) diff --git a/crates/qbz-qt/qml/views/purchases/PurchaseGridCard.qml b/crates/qbz-qt/qml/views/purchases/PurchaseGridCard.qml index 1b43c8dc4..f8215f4a2 100644 --- a/crates/qbz-qt/qml/views/purchases/PurchaseGridCard.qml +++ b/crates/qbz-qt/qml/views/purchases/PurchaseGridCard.qml @@ -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 } } } diff --git a/crates/qbz-qt/qml/views/purchases/PurchaseListRow.qml b/crates/qbz-qt/qml/views/purchases/PurchaseListRow.qml index 5e3c528a9..dbfada0fd 100644 --- a/crates/qbz-qt/qml/views/purchases/PurchaseListRow.qml +++ b/crates/qbz-qt/qml/views/purchases/PurchaseListRow.qml @@ -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.