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:
2 files changed
+47
-41
No files matched your search
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import com.blitzfc.qbz
|
import com.blitzfc.qbz
|
||||||
|
import "../../controls"
|
||||||
import "../../theme"
|
import "../../theme"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -106,41 +107,44 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Title / artist / quality ------------------------------------
|
// --- Title / artist + quality badge ------------------------------
|
||||||
Column {
|
// 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
|
width: parent.width
|
||||||
spacing: 2
|
height: 40
|
||||||
|
spacing: theme.spacingSm
|
||||||
Text {
|
Column {
|
||||||
width: parent.width
|
width: parent.width - (qBadge.visible ? qBadge.width + theme.spacingSm : 0)
|
||||||
height: 20
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: root.album.title || ""
|
spacing: 2
|
||||||
color: theme.textPrimary
|
Text {
|
||||||
font.pixelSize: theme.fontBody
|
width: parent.width
|
||||||
font.weight: theme.weightMedium
|
height: 20
|
||||||
verticalAlignment: Text.AlignVCenter
|
text: root.album.title || ""
|
||||||
elide: Text.ElideRight
|
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 {
|
QualityMini {
|
||||||
width: parent.width
|
id: qBadge
|
||||||
height: 17
|
tier: root.album.qualityTier || ""
|
||||||
text: root.album.artist || ""
|
label: root.album.qualityDetail || ""
|
||||||
color: theme.textMuted
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import com.blitzfc.qbz
|
import com.blitzfc.qbz
|
||||||
|
import "../../controls"
|
||||||
import "../../theme"
|
import "../../theme"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -116,16 +117,17 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Quality column.
|
// Quality column — the SAME badge the album list rows show
|
||||||
Text {
|
// (views/AlbumListRow.qml): tier label over the exact quality line.
|
||||||
|
Item {
|
||||||
width: 110
|
width: 110
|
||||||
height: parent.height
|
height: parent.height
|
||||||
text: root.album.qualityTier || ""
|
QualityBadgeFull {
|
||||||
color: theme.textSecondary
|
anchors.right: parent.right
|
||||||
font.pixelSize: theme.fontLegal
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
horizontalAlignment: Text.AlignRight
|
tier: root.album.qualityTier || ""
|
||||||
verticalAlignment: Text.AlignVCenter
|
detail: root.album.qualityDetail || ""
|
||||||
elide: Text.ElideRight
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Purchase-date column.
|
// Purchase-date column.
|
||||||
|
|||||||
Reference in new issue
Block a user