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

+4
View File
@@ -304,11 +304,15 @@ struct Page<Content: View>: View {
var large = true var large = true
@ViewBuilder let content: () -> Content @ViewBuilder let content: () -> Content
@Environment(\.palette) private var p @Environment(\.palette) private var p
@Environment(Ui.self) private var ui
@AppStorage("duoSwap") private var swap = false
var body: some View { var body: some View {
ScrollView { ScrollView {
LazyVStack(alignment: .leading, spacing: 0) { content() } LazyVStack(alignment: .leading, spacing: 0) { content() }
.padding(.bottom, 24) .padding(.bottom, 24)
} }
// Split at the iPhone Duo's hinge, rows run right up to it (no inset is real on that side).
.ignoresSafeArea(.container, edges: ui.split ? (swap ? .leading : .trailing) : [])
.background(p.bg) .background(p.bg)
.navigationTitle(title) .navigationTitle(title)
.navigationBarTitleDisplayMode(large ? .large : .inline) .navigationBarTitleDisplayMode(large ? .large : .inline)
+4
View File
@@ -170,6 +170,10 @@ private struct DuoPane<Content: View>: View {
layout { layout {
content content
.environment(\.layoutDirection, .leftToRight) .environment(\.layoutDirection, .leftToRight)
// The tab's navigation picks up the window's right-hand inset (the status column)
// even though it ends at the hinge, so the bar and rows stopped short of it. The
// hinge side never needs an inset.
.ignoresSafeArea(.container, edges: cut?.vertical == true ? (flip ? .leading : .trailing) : [])
.frame(width: cut.map { $0.vertical ? (flip ? $0.second : $0.first) : geo.size.width } ?? geo.size.width, .frame(width: cut.map { $0.vertical ? (flip ? $0.second : $0.first) : geo.size.width } ?? geo.size.width,
height: cut.map { $0.vertical ? geo.size.height : $0.first } ?? geo.size.height) height: cut.map { $0.vertical ? geo.size.height : $0.first } ?? geo.size.height)
if let cut { if let cut {
@@ -115,6 +115,7 @@ struct NowPlayingScreen: View {
@State private var artBox: CGSize = .zero @State private var artBox: CGSize = .zero
/// The screen's height, for the strip at the top that a drag down closes from. /// The screen's height, for the strip at the top that a drag down closes from.
@State private var screenH: CGFloat = 0 @State private var screenH: CGFloat = 0
@Environment(\.verticalSizeClass) private var vSize
private var artInset: CGFloat { tight ? 18 : 28 } private var artInset: CGFloat { tight ? 18 : 28 }
private var hPad: CGFloat { tight ? 20 : 28 } private var hPad: CGFloat { tight ? 20 : 28 }
private var g: AppGraph { .shared } private var g: AppGraph { .shared }
@@ -161,6 +162,10 @@ struct NowPlayingScreen: View {
.frame(maxWidth: .infinity, maxHeight: .infinity) .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(.top, docked ? 4 : tight ? 14 : 20)
.padding(.bottom, tight ? 4 : 8) .padding(.bottom, tight ? 4 : 8)
.frame(maxWidth: .infinity, maxHeight: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
@@ -737,6 +742,8 @@ private struct MixerPanel: View {
.padding(.horizontal, -24) .padding(.horizontal, -24)
.padding(.vertical, 8) .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. // 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 TimelineView(.animation(minimumInterval: 1 / 30, paused: !stems || !pm.playWhenReady)) { _ in
let levels = stems ? meters.step(pm.engine, names.count) : [] let levels = stems ? meters.step(pm.engine, names.count) : []
@@ -749,6 +756,7 @@ private struct MixerPanel: View {
Spacer(minLength: 8) Spacer(minLength: 8)
} }
.padding(.horizontal, 24) .padding(.horizontal, 24)
.frame(minHeight: geo.size.height)
} }
.scrollIndicators(.hidden) .scrollIndicators(.hidden)
// Holds still when everything fits, so a drag down closes Now Playing instead. // 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. /// Shortest stacked row: name line, fader and the gap under it.
static let roomyMin: CGFloat = 60 static let roomyMin: CGFloat = 60
/// Shortest side-by-side row, the fader's own height. /// 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. /// Preset chips plus the bottom gap.
static let roomyChrome: CGFloat = 56 static let roomyChrome: CGFloat = 56
static let compactChrome: CGFloat = 56 static let compactChrome: CGFloat = 56
+1 -1
View File
@@ -9,7 +9,7 @@ settings:
# iOS needs a plain number for the bundle version; the label is what the app and releases show. # iOS needs a plain number for the bundle version; the label is what the app and releases show.
MARKETING_VERSION: "0.9.0" MARKETING_VERSION: "0.9.0"
VERSION_LABEL: "0.9.0" VERSION_LABEL: "0.9.0"
CURRENT_PROJECT_VERSION: "28" CURRENT_PROJECT_VERSION: "29"
# Dev builds override these (build-ipa.sh dev) so they install next to the release app. # Dev builds override these (build-ipa.sh dev) so they install next to the release app.
APP_ID: org.cdnutter.stemify APP_ID: org.cdnutter.stemify
APP_NAME: Stemify APP_NAME: Stemify