iPad: move the scope into the header beside the transport
Reclaim the header's dead space: a narrow scope now sits left of a Start/Record transport cluster in the compact header. The scope is removed from the top strip (CPU meters stay), and the Record button moves up next to Start. The recording- folder chooser (set-and-forget) moves into the Settings sheet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,9 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
/// Width of the scope/CPU block in the bottom strip — matches `BoardBarView`'s Solo/Blend/All
|
/// Width of the scope/CPU block in the bottom strip — matches `BoardBarView`'s Solo/Blend/All
|
||||||
/// control column so the scope aligns under it.
|
/// control column so the scope aligns under it.
|
||||||
private static let scopeWidth: CGFloat = 188
|
private static let scopeWidth: CGFloat = 188
|
||||||
|
/// Narrow scope shown in the compact (iPad) header, tucked left of the transport buttons.
|
||||||
|
private static let compactHeaderScopeWidth: CGFloat = 340
|
||||||
|
private static let compactHeaderScopeHeight: CGFloat = 76
|
||||||
private static let columnSpacing: CGFloat = 14
|
private static let columnSpacing: CGFloat = 14
|
||||||
private static let backgroundRed: Double = 0.08
|
private static let backgroundRed: Double = 0.08
|
||||||
private static let backgroundGreen: Double = 0.07
|
private static let backgroundGreen: Double = 0.07
|
||||||
@@ -465,9 +468,6 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
VStack(alignment: .leading, spacing: ShoeGazeBuilderView.sectionSpacing) {
|
VStack(alignment: .leading, spacing: ShoeGazeBuilderView.sectionSpacing) {
|
||||||
if isCompact {
|
if isCompact {
|
||||||
compactHeader
|
compactHeader
|
||||||
#if !os(macOS)
|
|
||||||
recordingRow
|
|
||||||
#endif
|
|
||||||
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
|
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
|
||||||
compactTopSection
|
compactTopSection
|
||||||
} else {
|
} else {
|
||||||
@@ -492,7 +492,7 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
private var compactHeader: some View {
|
private var compactHeader: some View {
|
||||||
_ = transportTick
|
_ = transportTick
|
||||||
return VStack(alignment: .leading, spacing: ShoeGazeBuilderView.rowSpacing) {
|
return VStack(alignment: .leading, spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||||
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
HStack(alignment: .top, spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||||
VStack(alignment: .leading, spacing: 1) {
|
VStack(alignment: .leading, spacing: 1) {
|
||||||
Text("ShoeGaze Builder").font(.headline).bold()
|
Text("ShoeGaze Builder").font(.headline).bold()
|
||||||
.foregroundStyle(Color.white)
|
.foregroundStyle(Color.white)
|
||||||
@@ -500,13 +500,24 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
}
|
}
|
||||||
if shoeGaze.isRecording { recordingBadge }
|
if shoeGaze.isRecording { recordingBadge }
|
||||||
Spacer()
|
Spacer()
|
||||||
// Transport stays on screen (performance): Start / Stop only.
|
// 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(
|
EngineConfigView(
|
||||||
shoeGaze: shoeGaze,
|
shoeGaze: shoeGaze,
|
||||||
hardwareSampleRate: hardwareSampleRate,
|
hardwareSampleRate: hardwareSampleRate,
|
||||||
onConfigApplied: { transportTick.toggle() },
|
onConfigApplied: { transportTick.toggle() },
|
||||||
transportOnly: true
|
transportOnly: true
|
||||||
)
|
)
|
||||||
|
#if !os(macOS)
|
||||||
|
recordButton
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView(.horizontal, showsIndicators: false) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
@@ -578,7 +589,7 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
|
|
||||||
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
|
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
|
||||||
|
|
||||||
ShoeGazeScopeView(shoeGaze: shoeGaze)
|
// Scope moved to the header (next to the transport); the CPU meters stay here.
|
||||||
LyrebirdStatusView(engine: shoeGaze.engine)
|
LyrebirdStatusView(engine: shoeGaze.engine)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -642,6 +653,15 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
.pickerStyle(.menu)
|
.pickerStyle(.menu)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !os(macOS)
|
||||||
|
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
|
||||||
|
Text("Recording")
|
||||||
|
.font(.headline)
|
||||||
|
.foregroundStyle(Color.white)
|
||||||
|
recordingFolderPicker
|
||||||
|
#endif
|
||||||
|
|
||||||
Spacer(minLength: 0)
|
Spacer(minLength: 0)
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
@@ -1133,6 +1153,26 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
#if !os(macOS)
|
#if !os(macOS)
|
||||||
/// iOS recording controls: choose an output folder, then start/stop recording.
|
/// iOS recording controls: choose an output folder, then start/stop recording.
|
||||||
private var recordingRow: some View {
|
private var recordingRow: some View {
|
||||||
|
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||||
|
recordingFolderPicker
|
||||||
|
Spacer()
|
||||||
|
recordButton
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The Record / Stop-Recording button (performance control; lives in the compact header).
|
||||||
|
private var recordButton: some View {
|
||||||
|
Button(shoeGaze.isRecording ? "Stop Recording" : "Record") {
|
||||||
|
toggleRecording()
|
||||||
|
}
|
||||||
|
.buttonStyle(.borderedProminent)
|
||||||
|
.tint(shoeGaze.isRecording ? .red : .accentColor)
|
||||||
|
.disabled(shoeGaze.recordingFolder == nil && !shoeGaze.isRecording)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The recording-folder chooser + current folder name (a set-and-forget control; shown in the
|
||||||
|
/// compact Settings sheet).
|
||||||
|
private var recordingFolderPicker: some View {
|
||||||
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||||
Button("Recording Folder…") { showRecordingFolderImporter = true }
|
Button("Recording Folder…") { showRecordingFolderImporter = true }
|
||||||
.buttonStyle(.bordered).tint(.blue)
|
.buttonStyle(.bordered).tint(.blue)
|
||||||
@@ -1141,13 +1181,6 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
.foregroundStyle(Color.white.opacity(ShoeGazeBuilderView.folderLabelOpacity))
|
.foregroundStyle(Color.white.opacity(ShoeGazeBuilderView.folderLabelOpacity))
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.truncationMode(.middle)
|
.truncationMode(.middle)
|
||||||
Spacer()
|
|
||||||
Button(shoeGaze.isRecording ? "Stop Recording" : "Record") {
|
|
||||||
toggleRecording()
|
|
||||||
}
|
|
||||||
.buttonStyle(.borderedProminent)
|
|
||||||
.tint(shoeGaze.isRecording ? .red : .accentColor)
|
|
||||||
.disabled(shoeGaze.recordingFolder == nil && !shoeGaze.isRecording)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user