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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user