fix(qt): search top-result track hero no longer invades the Artists rail + crown icon

Two Most-popular regressions on the search results page:

- When the top result is a TRACK, the hero painted from its slot's center
  ~100px into the Artists carousel: SearchTrackHero's root Rectangle had
  no size, and a bare Item's implicit size is 0x0 (it does not size from
  children), so the slot's horizontalCenter anchor pushed the whole card
  sideways. The artist/album arms carry explicit sizes and never shifted.
  The hero now declares its 200px width explicitly.
- The header glyph was "award", which reads as a mic. The reference uses
  the crown (SearchResultsView.slint:584); crown.svg is ported into the
  icon masters (primary + the warning bake) and the header uses it.

Both verified live on a VNC-driven session with the exact "all things"
search from the report.

km
This commit is contained in:
vicrodh committed 2026-08-10 22:08:43 -06:00
1 parent 1fe20e9af0
commit af95ce164a
4 files changed
+15 -1

No files matched your search

+12 -1
View File
@@ -247,9 +247,17 @@ Rectangle {
property var card: ({})
property string qualityLabel: ""
color: "transparent"
// EXPLICIT size, and load-bearing: a bare Rectangle's implicit size
// is 0x0 (Item does NOT size from children), and the hero slot centers
// it — so the whole card painted from the slot's CENTER, ~100px into
// the Artists carousel, whenever the top result was a track (the
// artist/album arms carry their own 200px and never shifted).
width: 200
height: heroCol.implicitHeight
readonly property bool overlayOn: heroArtArea.containsMouse
Column {
id: heroCol
spacing: 0
Rectangle {
width: 200
@@ -508,7 +516,10 @@ Rectangle {
spacing: 12
Row {
spacing: 8
QbzIcon { name: "award"; width: 18; height: 18; tintName: "warning" }
// The crown, 1:1 with the reference
// (SearchResultsView.slint:584) — the POC's
// "award" read as a mic.
QbzIcon { name: "crown"; width: 18; height: 18; tintName: "warning" }
Text {
text: QbzSession.tr("Most popular", QbzSession.trRev)
color: theme.textPrimary