iPad: move header panel row to full width so it isn't clipped in portrait
The panel/toggle row (Rigs / Pedals / Settings / Bypass / Mute rig / help / MIDI) sat in the header's left column beside the wide scope, so in the narrower portrait width its right end (Mute rig, help, MIDI) was cut off. Move it to a full-width row beneath the title + scope + transport; it now fits portrait and still scrolls on very narrow (split-view) widths. Tempo/Tuner stay under the title. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -500,48 +500,51 @@ public struct ShoeGazeBuilderView: View {
|
||||
/// horizontally scrollable row of panel toggles that open the composition sheets.
|
||||
private var compactHeader: some View {
|
||||
_ = transportTick
|
||||
// Left column fills the vertical space under the title with the panel/toggle rows; the
|
||||
// right column carries the scope + transport. Top-aligned so nothing floats mid-header.
|
||||
return HStack(alignment: .top, spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
VStack(alignment: .leading, spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
VStack(alignment: .leading, spacing: 1) {
|
||||
Text("ShoeGaze Builder").font(.headline).bold()
|
||||
.foregroundStyle(Color.white)
|
||||
currentRigLabel
|
||||
// Top row: title + Tempo/Tuner on the left, scope + transport on the right. The panel row
|
||||
// (Rigs / Pedals / Settings / Bypass / Mute / help / MIDI) spans the FULL width beneath, so
|
||||
// it is never clipped by the scope in the narrower portrait width.
|
||||
return VStack(alignment: .leading, spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
HStack(alignment: .top, spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
VStack(alignment: .leading, spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
VStack(alignment: .leading, spacing: 1) {
|
||||
Text("ShoeGaze Builder").font(.headline).bold()
|
||||
.foregroundStyle(Color.white)
|
||||
currentRigLabel
|
||||
}
|
||||
if shoeGaze.isRecording { recordingBadge }
|
||||
}
|
||||
if shoeGaze.isRecording { recordingBadge }
|
||||
|
||||
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
TempoView(shoeGaze: shoeGaze)
|
||||
TunerView(shoeGaze: shoeGaze)
|
||||
}
|
||||
.environment(\.shoeGazeTempoEnabled, shoeGaze.tempoEnabled)
|
||||
}
|
||||
|
||||
compactPanelRow
|
||||
Spacer(minLength: ShoeGazeBuilderView.rowSpacing)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
Spacer(minLength: ShoeGazeBuilderView.rowSpacing)
|
||||
|
||||
// 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
|
||||
}
|
||||
compactPanelRow
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user