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:
@@ -558,13 +558,16 @@ public struct ShoeGazeBuilderView: View {
|
||||
/// 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.
|
||||
private var compactTopSection: some View {
|
||||
VStack(alignment: .leading, spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
VStack(alignment: .leading, spacing: ShoeGazeBuilderView.sectionSpacing) {
|
||||
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
TempoView(shoeGaze: shoeGaze)
|
||||
TunerView(shoeGaze: shoeGaze)
|
||||
Spacer(minLength: 0)
|
||||
}
|
||||
.environment(\.shoeGazeTempoEnabled, shoeGaze.tempoEnabled)
|
||||
|
||||
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
|
||||
|
||||
BoardBarView(
|
||||
shoeGaze: shoeGaze,
|
||||
editingBoardIndex: $selectedBoardIndex,
|
||||
@@ -573,6 +576,8 @@ public struct ShoeGazeBuilderView: View {
|
||||
onClearBoards: { showClearDialog = true }
|
||||
)
|
||||
|
||||
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
|
||||
|
||||
ShoeGazeScopeView(shoeGaze: shoeGaze)
|
||||
LyrebirdStatusView(engine: shoeGaze.engine)
|
||||
}
|
||||
@@ -588,6 +593,9 @@ public struct ShoeGazeBuilderView: View {
|
||||
)
|
||||
.padding()
|
||||
.navigationTitle("Add Pedal")
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#endif
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
Button("Done") { showPaletteSheet = false }
|
||||
@@ -601,28 +609,48 @@ public struct ShoeGazeBuilderView: View {
|
||||
/// a compact sheet — the set-and-forget composition controls.
|
||||
private var settingsSheet: some View {
|
||||
NavigationStack {
|
||||
Form {
|
||||
Section("Engine") {
|
||||
// A plain scroll (not a Form) so the engine controls' horizontal row has the full sheet
|
||||
// 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(
|
||||
shoeGaze: shoeGaze,
|
||||
hardwareSampleRate: hardwareSampleRate,
|
||||
onConfigApplied: { transportTick.toggle() }
|
||||
)
|
||||
}
|
||||
Section("Input") {
|
||||
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)
|
||||
|
||||
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
|
||||
|
||||
HStack {
|
||||
Text("Input")
|
||||
.font(.headline)
|
||||
.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")
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#endif
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
Button("Done") { showSettingsSheet = false }
|
||||
|
||||
@@ -26,8 +26,6 @@ public struct TempoView: View {
|
||||
private static let bpmStep: Double = 1.0
|
||||
private static let ledDiameter: CGFloat = 14
|
||||
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.
|
||||
static let enabledHeight: CGFloat = 34
|
||||
|
||||
@@ -55,7 +53,7 @@ public struct TempoView: View {
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.tint(shoeGaze.tempoEnabled ? .green : .gray)
|
||||
.frame(width: TempoView.toggleWidth, alignment: .leading)
|
||||
.fixedSize()
|
||||
.help("Show the tempo indicator and enable tempo-synced controls")
|
||||
|
||||
if shoeGaze.tempoEnabled {
|
||||
|
||||
@@ -60,7 +60,7 @@ public struct TunerView: View {
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.tint(shoeGaze.tunerEngaged ? .green : .gray)
|
||||
.frame(width: TempoView.toggleWidth, alignment: .leading)
|
||||
.fixedSize()
|
||||
|
||||
if shoeGaze.tunerEngaged {
|
||||
readout
|
||||
|
||||
Reference in New Issue
Block a user