From 29a1742f8d61334057fb2dc8a027b3c9fde2bc3c Mon Sep 17 00:00:00 2001 From: root Date: Wed, 18 Nov 2026 16:45:44 -0800 Subject: [PATCH] Duo: fill folded Now Playing and hinge-side panes, centre stems, fit all faders Co-Authored-By: Claude Opus 5.5 --- ios/Stemify/UI/Components/Chrome.swift | 4 ++++ ios/Stemify/UI/RootView.swift | 4 ++++ ios/Stemify/UI/Screens/NowPlayingScreen.swift | 10 +++++++++- ios/project.yml | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ios/Stemify/UI/Components/Chrome.swift b/ios/Stemify/UI/Components/Chrome.swift index bf0537f..79a9a12 100644 --- a/ios/Stemify/UI/Components/Chrome.swift +++ b/ios/Stemify/UI/Components/Chrome.swift @@ -304,11 +304,15 @@ struct Page: View { var large = true @ViewBuilder let content: () -> Content @Environment(\.palette) private var p + @Environment(Ui.self) private var ui + @AppStorage("duoSwap") private var swap = false var body: some View { ScrollView { LazyVStack(alignment: .leading, spacing: 0) { content() } .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) .navigationTitle(title) .navigationBarTitleDisplayMode(large ? .large : .inline) diff --git a/ios/Stemify/UI/RootView.swift b/ios/Stemify/UI/RootView.swift index 9f5088e..043ea33 100644 --- a/ios/Stemify/UI/RootView.swift +++ b/ios/Stemify/UI/RootView.swift @@ -170,6 +170,10 @@ private struct DuoPane: View { layout { content .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, height: cut.map { $0.vertical ? geo.size.height : $0.first } ?? geo.size.height) if let cut { diff --git a/ios/Stemify/UI/Screens/NowPlayingScreen.swift b/ios/Stemify/UI/Screens/NowPlayingScreen.swift index 3baa2da..b0cd3ea 100644 --- a/ios/Stemify/UI/Screens/NowPlayingScreen.swift +++ b/ios/Stemify/UI/Screens/NowPlayingScreen.swift @@ -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 diff --git a/ios/project.yml b/ios/project.yml index a4086da..0188b72 100644 --- a/ios/project.yml +++ b/ios/project.yml @@ -9,7 +9,7 @@ settings: # iOS needs a plain number for the bundle version; the label is what the app and releases show. MARKETING_VERSION: "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. APP_ID: org.cdnutter.stemify APP_NAME: Stemify