feat(qbz-qt): theme-following icons, the real header atmosphere, sharp covers, playback context

**Icons follow the theme.** The bakes are frozen dark-palette hexes, so on light
themes secondary, muted and accent were simply wrong, and accent was wrong on
any theme whose accent is not #4285f4. Slint recolours at render time, which
this path cannot do — so the tint is generated once per colour into the cache
and loaded through the same Image+svg path the bakes already use. No effect, no
shader, so it cannot hit the "renders nothing on software" failure.

The sweep found the part the diagnosis had missed: "primary" was two meanings
welded together — max-contrast-on-theme-surface, and literal white for glyphs on
hosts that are dark under every theme. Remapping it globally would have painted
dark glyphs on dark scrims in fourteen places. The vocabulary is split instead,
with "primary" left as an alias so nothing changes until it is migrated
deliberately.

**The album header gradient was Slint's fallback, not its design.** Slint paints
a blurred artwork field and only falls back to the flat two-band gradient when
that image is unavailable; the port shipped the fallback. The field needs no
shader — it is a 128x128 image, so the pipeline ports verbatim: the cover down
to 8x8, back up to 128, blur, colour adjust, vignette. The 8x8 step is the look,
not an optimization; everything after it works from eight pixels of colour,
which is why it reads as atmosphere rather than as a blurred cover. It comes out
of the same decode that already produced the flat tint.

**Covers were point-sampled.** Canvas drawImage does not filter when it scales,
measured at RMSE 0.000 against a nearest-neighbour reference — a 600px cover in
a 200px cell throws away eight of every nine pixels, and the error is aliasing,
not softness. Rust now produces a derivative at the drawn device size so the
draw is 1:1 and there is no resample at all.

**The now-playing context stack.** It had no Qt counterpart: the model carried
context_kind and context_id, some builders stamped them, and nothing ever read
them back. The album path only appeared to work by coincidence, because the
glyph was hardcoded to open the album.

Plus: Discover's missing rails with real play history, Recommendations on the
integrations, queue drag reorder, and the playlist detail collage.

cc
This commit is contained in:
vicrodh committed 2026-07-28 21:12:31 -06:00
1 parent a1c771c39e
commit 2a5b5ac16e
31 files changed
+3548 -329

No files matched your search

+28 -3
View File
@@ -75,14 +75,39 @@ Item {
// logs a warning on every re-evaluation.
readonly property color tintColor: root.tint === "" ? "transparent" : root.tint
visible: root.active && root.tint !== ""
visible: root.active && (root.tint !== "" || root.hasAtmosphere)
// Never eat clicks meant for the header controls painted on top.
enabled: false
// Band 1 — the artwork tint. Solid down to the 82% mark (route A's image
// field is opaque over exactly that span); the last 18% is band 4's job.
/// ROUTE A — the blurred artwork field Slint actually renders
/// (`ImmersiveAtmosphere`, AlbumPageView.slint:222). It needs no shader:
/// the atmosphere is a 128x128 image produced in Rust
/// (atmosphere_qt.rs, the immersive.rs pipeline ported stage for stage),
/// so it works on the software path like any other picture. Empty means
/// the cover has not resolved yet and route B stands in.
property string atmosphere: ""
readonly property bool hasAtmosphere: root.atmosphere !== ""
Image {
anchors.fill: parent
source: root.atmosphere
visible: root.hasAtmosphere
// 128px stretched across a whole header IS the design — the source is
// eight pixels of colour blurred out, so smooth scaling is the point.
smooth: true
fillMode: Image.Stretch
// ImmersiveAtmosphere.slint's base-opacity for a static header field.
opacity: 0.92
asynchronous: true
}
// Band 1 — ROUTE B, the flat tint. This is Slint's FALLBACK, painted only
// while no atmosphere exists; shipping it as the design is what made the
// header read as a plain ugly gradient. Solid to the 82% mark, the last
// 18% is band 4's job.
Rectangle {
anchors.fill: parent
visible: !root.hasAtmosphere
gradient: Gradient {
GradientStop { position: 0.0; color: root.tintColor }
GradientStop { position: 0.16; color: root.tintColor }