From bf1e09ede30483d788f669d679557e3135746641 Mon Sep 17 00:00:00 2001 From: Joshua Parmenter Date: Sat, 4 Jul 2026 21:46:03 -0700 Subject: [PATCH] iPad header: close the gap between rows 1 and 2 The tall scope lived inside row 1, so it set row 1's height and left a gap above the Tempo/Tuner row. Put the three left rows in their own VStack (tight rowSpacing) with scope + transport as a right column spanning them. Co-Authored-By: Claude Opus 4.8 --- .../ShoeGazeBuilderView.swift | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift b/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift index 212d7c2..2c52d82 100644 --- a/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift +++ b/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift @@ -500,11 +500,13 @@ public struct ShoeGazeBuilderView: View { /// horizontally scrollable row of panel toggles that open the composition sheets. private var compactHeader: some View { _ = transportTick - // Row 1: title, then the rig-wide controls filling the space to its right (a scroll view - // flexes to the gap between the title and the scope), then scope + transport. Row 2: Tempo / - // Tuner. Row 3: the composition sheet-openers. - return VStack(alignment: .leading, spacing: ShoeGazeBuilderView.rowSpacing) { - HStack(alignment: .top, spacing: ShoeGazeBuilderView.rowSpacing) { + // Left column stacks the three tight rows; scope + transport form a right column spanning + // them, so the tall scope no longer sets row 1's height (which opened a gap above row 2). + // Row 1: title · [Bypass · Mute · Help · MIDI filling to the scope] + // Row 2: Tempo · Tuner + // Row 3: Rigs · Pedals · Settings + return HStack(alignment: .top, spacing: ShoeGazeBuilderView.rowSpacing) { + VStack(alignment: .leading, spacing: ShoeGazeBuilderView.rowSpacing) { HStack(spacing: ShoeGazeBuilderView.rowSpacing) { VStack(alignment: .leading, spacing: 1) { Text("ShoeGaze").font(.headline).bold() @@ -512,37 +514,36 @@ public struct ShoeGazeBuilderView: View { currentRigLabel } if shoeGaze.isRecording { recordingBadge } + compactRigControlsRow } - compactRigControlsRow - - // A narrow scope sits left of the transport cluster to use the header's dead space. - ShoeGazeScopeView(shoeGaze: shoeGaze) - .frame( - width: ShoeGazeBuilderView.compactHeaderScopeWidth, - height: ShoeGazeBuilderView.compactHeaderScopeHeight - ) - // Transport stays on screen (performance): Start / Stop over Record. - VStack(alignment: .trailing, spacing: ShoeGazeBuilderView.rowSpacing) { - EngineConfigView( - shoeGaze: shoeGaze, - hardwareSampleRate: hardwareSampleRate, - onConfigApplied: { transportTick.toggle() }, - transportOnly: true - ) - #if !os(macOS) - recordButton - #endif + HStack(spacing: ShoeGazeBuilderView.rowSpacing) { + TempoView(shoeGaze: shoeGaze) + TunerView(shoeGaze: shoeGaze) } + .environment(\.shoeGazeTempoEnabled, shoeGaze.tempoEnabled) + + compactPanelRow } - HStack(spacing: ShoeGazeBuilderView.rowSpacing) { - TempoView(shoeGaze: shoeGaze) - TunerView(shoeGaze: shoeGaze) + // A narrow scope sits left of the transport cluster to use the header's dead space. + ShoeGazeScopeView(shoeGaze: shoeGaze) + .frame( + width: ShoeGazeBuilderView.compactHeaderScopeWidth, + height: ShoeGazeBuilderView.compactHeaderScopeHeight + ) + // Transport stays on screen (performance): Start / Stop over Record. + VStack(alignment: .trailing, spacing: ShoeGazeBuilderView.rowSpacing) { + EngineConfigView( + shoeGaze: shoeGaze, + hardwareSampleRate: hardwareSampleRate, + onConfigApplied: { transportTick.toggle() }, + transportOnly: true + ) + #if !os(macOS) + recordButton + #endif } - .environment(\.shoeGazeTempoEnabled, shoeGaze.tempoEnabled) - - compactPanelRow } }