Duo: fill folded Now Playing and hinge-side panes, centre stems, fit all faders

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-11-18 16:45:44 -08:00
1 parent 09bf1b2835
commit 29a1742f8d
4 files changed
+18 -2

No files matched your search

@@ -115,6 +115,7 @@ struct NowPlayingScreen: View {
@State private var artBox: CGSize = .zero
/// The screen's height, for the strip at the top that a drag down closes from.
@State private var screenH: CGFloat = 0
@Environment(\.verticalSizeClass) private var vSize
private var artInset: CGFloat { tight ? 18 : 28 }
private var hPad: CGFloat { tight ? 20 : 28 }
private var g: AppGraph { .shared }
@@ -161,6 +162,10 @@ struct NowPlayingScreen: View {
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
}
// Folded, the iPhone Duo keeps a status column down the right edge. Run the player under it
// (it only overlaps the sliding preset chips) instead of leaving a quarter of the screen empty.
// Upright iPhones have no side insets, so this only changes the Duo.
.ignoresSafeArea(.container, edges: !docked && vSize == .regular ? .trailing : [])
.padding(.top, docked ? 4 : tight ? 14 : 20)
.padding(.bottom, tight ? 4 : 8)
.frame(maxWidth: .infinity, maxHeight: .infinity)
@@ -737,6 +742,8 @@ private struct MixerPanel: View {
.padding(.horizontal, -24)
.padding(.vertical, 8)
}
// Any height the rows can't use goes evenly above and below them, so the stems sit centred.
Spacer(minLength: 0)
// The meters' fall is timed, so 30 fps looks the same and costs a quarter of 120.
TimelineView(.animation(minimumInterval: 1 / 30, paused: !stems || !pm.playWhenReady)) { _ in
let levels = stems ? meters.step(pm.engine, names.count) : []
@@ -749,6 +756,7 @@ private struct MixerPanel: View {
Spacer(minLength: 8)
}
.padding(.horizontal, 24)
.frame(minHeight: geo.size.height)
}
.scrollIndicators(.hidden)
// Holds still when everything fits, so a drag down closes Now Playing instead.
@@ -814,7 +822,7 @@ extension MixerPanel {
/// Shortest stacked row: name line, fader and the gap under it.
static let roomyMin: CGFloat = 60
/// Shortest side-by-side row, the fader's own height.
static let compactMin: CGFloat = 36
static let compactMin: CGFloat = 30
/// Preset chips plus the bottom gap.
static let roomyChrome: CGFloat = 56
static let compactChrome: CGFloat = 56