iPad polish: fix Tempo/Tuner truncation, sheet title overlap, cramped strip

- TempoView/TunerView toggles size to content (fixedSize) instead of a fixed
  96pt width that truncated "Tempo: On" to "Tempo:…" at iOS font sizes.
- Add-Pedal sheet uses an inline navigation title so the large title no longer
  draws over the palette list.
- Settings sheet lays the engine controls out in a plain scroll (not a Form),
  so the Start button isn't compressed to "S…"; input picker on its own row.
- Compact top strip separates Tempo/Tuner, the board mixer, and the scope with
  dividers and section spacing so they stop visually colliding.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-04 14:58:10 -07:00
parent efa193ea37
commit ba80573213
3 changed files with 42 additions and 16 deletions
@@ -558,13 +558,16 @@ public struct ShoeGazeBuilderView: View {
/// Compact top strip: performance monitoring kept on screen — the board switch/mixer bar, the /// Compact top strip: performance monitoring kept on screen — the board switch/mixer bar, the
/// scope, and the CPU meters. Tempo / Tuner sit below so they don't crowd the transport row. /// scope, and the CPU meters. Tempo / Tuner sit below so they don't crowd the transport row.
private var compactTopSection: some View { private var compactTopSection: some View {
VStack(alignment: .leading, spacing: ShoeGazeBuilderView.rowSpacing) { VStack(alignment: .leading, spacing: ShoeGazeBuilderView.sectionSpacing) {
HStack(spacing: ShoeGazeBuilderView.rowSpacing) { HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
TempoView(shoeGaze: shoeGaze) TempoView(shoeGaze: shoeGaze)
TunerView(shoeGaze: shoeGaze) TunerView(shoeGaze: shoeGaze)
Spacer(minLength: 0)
} }
.environment(\.shoeGazeTempoEnabled, shoeGaze.tempoEnabled) .environment(\.shoeGazeTempoEnabled, shoeGaze.tempoEnabled)
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
BoardBarView( BoardBarView(
shoeGaze: shoeGaze, shoeGaze: shoeGaze,
editingBoardIndex: $selectedBoardIndex, editingBoardIndex: $selectedBoardIndex,
@@ -573,6 +576,8 @@ public struct ShoeGazeBuilderView: View {
onClearBoards: { showClearDialog = true } onClearBoards: { showClearDialog = true }
) )
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
ShoeGazeScopeView(shoeGaze: shoeGaze) ShoeGazeScopeView(shoeGaze: shoeGaze)
LyrebirdStatusView(engine: shoeGaze.engine) LyrebirdStatusView(engine: shoeGaze.engine)
} }
@@ -588,6 +593,9 @@ public struct ShoeGazeBuilderView: View {
) )
.padding() .padding()
.navigationTitle("Add Pedal") .navigationTitle("Add Pedal")
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
#endif
.toolbar { .toolbar {
ToolbarItem(placement: .confirmationAction) { ToolbarItem(placement: .confirmationAction) {
Button("Done") { showPaletteSheet = false } Button("Done") { showPaletteSheet = false }
@@ -601,28 +609,48 @@ public struct ShoeGazeBuilderView: View {
/// a compact sheet — the set-and-forget composition controls. /// a compact sheet — the set-and-forget composition controls.
private var settingsSheet: some View { private var settingsSheet: some View {
NavigationStack { NavigationStack {
Form { // A plain scroll (not a Form) so the engine controls' horizontal row has the full sheet
Section("Engine") { // width — a Form row compresses it and clips the Start button to "S…".
ScrollView {
VStack(alignment: .leading, spacing: ShoeGazeBuilderView.sectionSpacing) {
Text("Engine")
.font(.headline)
.foregroundStyle(Color.white)
EngineConfigView( EngineConfigView(
shoeGaze: shoeGaze, shoeGaze: shoeGaze,
hardwareSampleRate: hardwareSampleRate, hardwareSampleRate: hardwareSampleRate,
onConfigApplied: { transportTick.toggle() } onConfigApplied: { transportTick.toggle() }
) )
}
Section("Input") { Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
Picker("Input", selection: inputBinding) {
Text("Test Loop").tag(ShoeGazeBuilderView.testLoopTag) HStack {
if shoeGaze.engine.numInputChannels > 0 { Text("Input")
ForEach(Array(0..<shoeGaze.engine.numInputChannels), id: \.self) { channel in .font(.headline)
Text("In \(channel)").tag(channel) .foregroundStyle(Color.white)
Spacer()
Picker("Input", selection: inputBinding) {
Text("Test Loop").tag(ShoeGazeBuilderView.testLoopTag)
if shoeGaze.engine.numInputChannels > 0 {
ForEach(Array(0..<shoeGaze.engine.numInputChannels), id: \.self) { channel in
Text("In \(channel)").tag(channel)
}
} else if onEnableLiveInput != nil {
Text("Live Input").tag(0)
} }
} else if onEnableLiveInput != nil {
Text("Live Input").tag(0)
} }
.labelsHidden()
.pickerStyle(.menu)
} }
Spacer(minLength: 0)
} }
.padding()
.frame(maxWidth: .infinity, alignment: .leading)
} }
.navigationTitle("Settings") .navigationTitle("Settings")
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
#endif
.toolbar { .toolbar {
ToolbarItem(placement: .confirmationAction) { ToolbarItem(placement: .confirmationAction) {
Button("Done") { showSettingsSheet = false } Button("Done") { showSettingsSheet = false }
+1 -3
View File
@@ -26,8 +26,6 @@ public struct TempoView: View {
private static let bpmStep: Double = 1.0 private static let bpmStep: Double = 1.0
private static let ledDiameter: CGFloat = 14 private static let ledDiameter: CGFloat = 14
private static let rowSpacing: CGFloat = 10 private static let rowSpacing: CGFloat = 10
/// Shared width for the Tempo / Tuner engage toggles so they left-align in the stacked column.
static let toggleWidth: CGFloat = 96
/// Fixed row height = the enabled (BPM/TAP-visible) height, so toggling doesn't shift layout. /// Fixed row height = the enabled (BPM/TAP-visible) height, so toggling doesn't shift layout.
static let enabledHeight: CGFloat = 34 static let enabledHeight: CGFloat = 34
@@ -55,7 +53,7 @@ public struct TempoView: View {
} }
.buttonStyle(.bordered) .buttonStyle(.bordered)
.tint(shoeGaze.tempoEnabled ? .green : .gray) .tint(shoeGaze.tempoEnabled ? .green : .gray)
.frame(width: TempoView.toggleWidth, alignment: .leading) .fixedSize()
.help("Show the tempo indicator and enable tempo-synced controls") .help("Show the tempo indicator and enable tempo-synced controls")
if shoeGaze.tempoEnabled { if shoeGaze.tempoEnabled {
+1 -1
View File
@@ -60,7 +60,7 @@ public struct TunerView: View {
} }
.buttonStyle(.bordered) .buttonStyle(.bordered)
.tint(shoeGaze.tunerEngaged ? .green : .gray) .tint(shoeGaze.tunerEngaged ? .green : .gray)
.frame(width: TempoView.toggleWidth, alignment: .leading) .fixedSize()
if shoeGaze.tunerEngaged { if shoeGaze.tunerEngaged {
readout readout