diff --git a/ios/Stemify/UI/Nav.swift b/ios/Stemify/UI/Nav.swift index ba9c98e..635a3f2 100644 --- a/ios/Stemify/UI/Nav.swift +++ b/ios/Stemify/UI/Nav.swift @@ -126,6 +126,7 @@ final class Ui { private var duo = UserDefaults.standard.bool(forKey: "duoSeen") /// Folded iPhone Duo: the outer display, kept upright. var folded: Bool { duo && !split && !unfolded } + var isDuo: Bool { duo } /// Called with the window's side insets. Upright, only the folded Duo has a trailing one. func sawInsets(trailing: CGFloat, upright: Bool) { diff --git a/ios/Stemify/UI/Screens/NowPlayingScreen.swift b/ios/Stemify/UI/Screens/NowPlayingScreen.swift index b24cc97..6de2bfd 100644 --- a/ios/Stemify/UI/Screens/NowPlayingScreen.swift +++ b/ios/Stemify/UI/Screens/NowPlayingScreen.swift @@ -67,6 +67,8 @@ struct NowPlayingScreen: View { /// Docked beside the hinge the pane is narrow, so the controls pack tighter. Full screen /// (folded or any other iPhone) uses the roomy layout across the whole window. private var tight: Bool { docked } + /// Full screen on the Duo (folded, or a Split View half), the controls run down into the home indicator strip. + private var runsLow: Bool { !docked && (folded || ui.isDuo) } /// Size of the art panel in the stacked layout, so the controls can match the art's width. @State private var artBox: CGSize = .zero /// The screen's height, for the strip at the top that a drag down closes from. @@ -91,7 +93,7 @@ struct NowPlayingScreen: View { if wide { // The column never drops below what the transport row needs, so the buttons // can't spill onto the art or under the Duo rail. - let col = tight ? min(max(geo.size.width * 0.46, 300), 420) : min(geo.size.width * 0.48, 440) + let col = tight ? min(max(geo.size.width * 0.46, 300), 420) : min(max(geo.size.width * 0.42, 300), 440) HStack(spacing: 0) { panelView(track, header: false) .frame(maxWidth: .infinity, maxHeight: .infinity) @@ -126,12 +128,12 @@ struct NowPlayingScreen: View { // Folded, the bottom inset is empty space too: run the controls down into it, and the art grows into the room. // The room under the controls has to be inside this view: padding outside it would keep // the view off the bottom edge, and then it can't run into the home indicator strip. - .padding(.bottom, folded && !docked ? 6 : 0) - .ignoresSafeArea(.container, edges: !docked && vSize == .regular ? (folded ? [.trailing, .bottom] : .trailing) : []) + .padding(.bottom, runsLow ? 6 : 0) + .ignoresSafeArea(.container, edges: !docked && vSize == .regular ? (runsLow ? [.trailing, .bottom] : .trailing) : []) // Measured outside the line above, so it still sees the status column. .onGeometryChange(for: Bool.self) { $0.safeAreaInsets.trailing > 20 } action: { folded = $0 && vSize == .regular } .padding(.top, docked ? 4 : tight ? 14 : 20) - .padding(.bottom, folded && !docked ? 0 : tight ? 4 : 8) + .padding(.bottom, runsLow ? 0 : tight ? 4 : 8) .frame(maxWidth: .infinity, maxHeight: .infinity) .background(c.bg.ignoresSafeArea()) .overlay(alignment: .top) { @@ -156,7 +158,7 @@ struct NowPlayingScreen: View { @ViewBuilder private func panelView(_ track: Track, header: Bool) -> some View { switch panel { - case .Art: ArtPanel(thumb: track.thumb, playing: g.playback.playWhenReady, inset: header || !tight ? artInset : 12, + case .Art: ArtPanel(thumb: track.thumb, playing: g.playback.playWhenReady, inset: header ? artInset : 12, leading: folded && !docked && !ui.split && g.settings.foldedArtLeft).contentShape(Rectangle()) case .Mixer: VStack(spacing: 0) { if header { mini(track) }; MixerPanel(spread: folded) } case .Queue: VStack(spacing: 0) { if header { mini(track) }; QueuePanel(close: { show(.Queue) }) } @@ -190,7 +192,7 @@ struct NowPlayingScreen: View { Spacer(minLength: 8) EllipsisButton(items: ui.menu.track(track)) } - .padding(.top, snug && !docked ? 20 : tight ? 8 : 14) + .padding(.top, snug && !docked ? 20 : tight ? 8 : ui.isDuo && !wide ? 30 : 14) .transition(.opacity.combined(with: .move(edge: .top))) } ProgressVolumeBar(played: g.settings.albumTheme ? c.accent : c.label, unplayed: c.label3, centerLabel: badge(track)) diff --git a/ios/project.yml b/ios/project.yml index c703fc4..a9099a5 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.10.1" VERSION_LABEL: "0.10.1" - CURRENT_PROJECT_VERSION: "49" + CURRENT_PROJECT_VERSION: "50" # Dev builds override these (build-ipa.sh dev) so they install next to the release app. APP_ID: org.cdnutter.stemify APP_NAME: Stemify