fix(slint): responsive album art in immersive Album Reactive so metadata never clips

The art was sized min(52vh, 460px) with only an 88px bottom pad, so on shorter
windows the art-block + metadata overflowed and the quality badge was clipped
under the floating player bar.

- base-art now derives from available height: it sizes the whole group
  (art*1.25 growth + 40px spacing + ~160px info + 132px player clearance) to
  fit viewport-height, with a viewport-width*0.55 cap for narrow windows,
  clamped to 180..460px.
- padding-bottom 88 -> 132 (clears the 90px player + 24px margin + gap);
  spacing 60 -> 40. Reserve constant kept in sync with base-art.

The Static panel (S3) will reuse this same responsive sizing.

cc
This commit is contained in:
vicrodh committed 2026-06-13 08:17:14 -06:00
1 parent 92052a3c2a
commit 786301a2e4
1 file changed
+13 -6
@@ -109,8 +109,14 @@ export component AlbumReactivePanel inherits Rectangle {
// glowOpacity = min(0.1 + globalEnergy * 1.5, 1) (Svelte line 167)
property <float> glow-opacity: Math.min(0.1 + root.global-energy * 1.5, 1.0);
// Base art box: Svelte `min(52vh, 460px)`. viewport-height is the vh basis.
property <length> base-art: Math.min(root.viewport-height * 0.52, 460px);
// Base art box. Tauri uses `min(52vh, 460px)`, but the Slint group must also
// leave room for the metadata block + the floating player, or the quality
// badge gets clipped under the bar. So size the art so the WHOLE group
// (art*1.25 growth + spacing + info) fits the viewport height, with a width
// cap for narrow windows. Reserve = pad-top(52) + spacing(40) + info(~160) +
// player clearance(132) = 384px. Clamped to a sane 180..460px range.
property <length> base-art: Math.max(180px,
Math.min(Math.min((root.viewport-height - 384px) / 1.25, root.viewport-width * 0.55), 460px));
// Reactive size = base * artScale. The glow layer and the art share this
// exact size/position so the halo stays glued to the art edge (per risk).
property <length> art-size: root.base-art * root.art-scale;
@@ -127,12 +133,13 @@ export component AlbumReactivePanel inherits Rectangle {
y: 0px;
width: root.viewport-width;
height: root.viewport-height;
// Reserve the Svelte top/bottom padding (52px / 88px) so the group does
// not collide with the ModeBar (top) or the player bar (bottom).
// Reserve top for the ModeBar and bottom for the floating player bar
// (90px + 24px margin + gap). base-art's reserve constant (384px) is kept
// in sync with these (pad-top 52 + spacing 40 + info ~160 + pad-bottom 132).
padding-top: 52px;
padding-bottom: 88px;
padding-bottom: 132px;
alignment: center;
spacing: 60px;
spacing: 40px;
// --- Artwork + glow ------------------------------------------------
artwork-block := Rectangle {