fix(qt): align the playlist manager's card grid with its own headings

The grid delegate carried x: 32 on the delegate ROOT. A ListView owns its
delegates' position, so an x set there is not reliably the one that survives
layout, and it did not: the cards sat about 24 px left of "Folders (12)" and
"Playlists (9)", which PmPageHead draws at 32 through its own Column. Headings
at one inset and cards at another, on the same page.

The list and tree delegates right below it already use the shape that works —
a full-width delegate with the inset on the child — so the grid now does too.
The inset lives where the view has no opinion about it.

cc
This commit is contained in:
vicrodh committed 2026-08-19 23:56:08 -06:00
1 parent 7e233104f5
commit 321d8fe753
1 file changed
+15 -2
@@ -252,8 +252,19 @@ Rectangle {
id: cell
required property int index
x: 32
width: root.contentW
// FULL-WIDTH DELEGATE, INSET ON THE CHILD — the shape the list and
// tree delegates below already use, and the reason this one is
// written the same way now:
//
// this delegate used to carry `x: 32` ITSELF. A ListView owns its
// delegates' position, so an `x` set on the delegate root is not
// reliably the one that survives layout — and it did not here: the
// card grid sat ~24 px left of the section headings above it, which
// `PmPageHead` draws at 32 through its own Column. Headings at one
// inset and cards at another, on the same page.
//
// The inset now lives where the view has no opinion about it.
width: pmList.width
height: root.cardH + 16
// A BINDING, not a function call: it must re-evaluate when the
@@ -262,6 +273,8 @@ Rectangle {
cell.index * root.gridCols, (cell.index + 1) * root.gridCols)
Row {
x: 32
width: root.contentW
spacing: 16
Repeater {