fix(ui): looper card no longer stretches to the canvas height

The flow canvas offers the pedal row its full viewport height
(BoardFlowView sets the content minHeight to the viewport). The looper's
columnar layout had Spacer(minLength: 0) inside its left and center
columns, making those VStacks greedy vertically, so the looper card
stretched to fill the offered height — pinning the Level/Bypass footer to
the bottom and leaving a large empty gap in the middle.

Remove both spacers so each column sizes to its content, and pin the
columnar content to intrinsic height with fixedSize(vertical:). Other
pedals were unaffected (their default layout has no vertical spacer).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-01 15:52:19 -07:00
parent ed3283f645
commit 323988af7b
+8 -5
View File
@@ -560,20 +560,20 @@ public struct PedalView: View {
namePlate
HStack(alignment: .top, spacing: PedalView.looperColumnSpacing) {
// Left column: timeline, then the Free/Sync switch, then the Reset footswitch.
// No trailing Spacer — the flow canvas offers the row its full viewport height,
// and a greedy Spacer here would stretch the whole card to fill it (leaving a
// large empty gap). Each column sizes to its content, like every other pedal.
VStack(spacing: PedalView.sectionSpacing) {
LooperTimelineView(pedal: looper)
switchRow
looperResetCell
Spacer(minLength: 0)
}
.frame(width: PedalView.looperTimelineColumnWidth)
// Centre column: the four effect knobs (2×2), with the Level + Bypass footer at the
// bottom. The Mix slot is reserved (empty) so Bypass stays horizontally centred,
// matching a normal pedal's footer.
// Centre column: the four effect knobs (2×2), with the Level + Bypass footer
// directly beneath (no greedy Spacer — see the left column note).
VStack(spacing: PedalView.sectionSpacing) {
looperEffectKnobs(columns: 2)
Spacer(minLength: 0)
looperFooter
}
@@ -583,6 +583,9 @@ public struct PedalView: View {
}
PedalMappingStrip(pedal: pedal, map: controlMappingMap)
}
// Pin to intrinsic height so the enclosure hugs its content even though the flow
// canvas offers the row its full viewport height.
.fixedSize(horizontal: false, vertical: true)
}
/// The looper's effect knobs (everything except the trailing `Mix` / `Level`) laid out in