iOS Duo: same vertical tab bar on every tab, docked Now Playing keeps its size, folded Now Playing fills the window (dev 28)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-11-18 15:29:03 -08:00
1 parent 09d8caface
commit 09bf1b2835
4 files changed
+5 -22

No files matched your search

-2
View File
@@ -125,8 +125,6 @@ final class Ui {
split = on
if on {
nowPlayingOpen = false
// Only an iPhone Duo ever splits, so from here on folded Now Playing uses its tighter layout.
UserDefaults.standard.set(true, forKey: "duoSeen")
}
// Karaoke left on shows its lyrics in the deck.
if on && AppGraph.shared.playback.karaoke { deckPage = .Lyrics } else if deckPage == .Lyrics { deckPage = .Stems }
-14
View File
@@ -144,20 +144,6 @@ private struct MiniPlayerRoom: ViewModifier {
content.safeAreaInset(edge: .bottom, spacing: 0) {
if !glassAccessory && !ui.split && g.playback.current != nil { Color.clear.frame(height: 66) }
}
.modifier(PaneToolbar())
}
}
/// Split, each pane is phone-sized, so its nav bar stays across the top instead of moving into
/// the Duo's vertical bar (the tab bar still goes there).
private struct PaneToolbar: ViewModifier {
@Environment(Ui.self) private var ui
func body(content: Content) -> some View {
if #available(iOS 27.1, *) {
content.toolbarVerticalBehavior(ui.split ? .disabled : .automatic)
} else {
content
}
}
}
@@ -108,10 +108,9 @@ struct NowPlayingScreen: View {
@State private var tint: Color?
/// How far the screen is being dragged down to close it.
@State private var drop: CGFloat = 0
/// Set once the phone has unfolded, so it's an iPhone Duo: its screens are shorter for their
/// width than a regular iPhone's, so the controls pack tighter and the art gets the room.
@AppStorage("duoSeen") private var duoSeen = false
private var tight: Bool { docked || duoSeen }
/// 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 }
/// 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.
@@ -147,7 +146,7 @@ struct NowPlayingScreen: View {
// Controls line up with the art's edges instead of running wider than it.
let art = min(artBox.width - 2 * artInset, artBox.height - 16)
// Every panel keeps the art screen's width, so switching to the stems doesn't widen it.
let w = art > 0 ? min(cap, max(300, art + 2 * hPad)) : cap
let w = !docked ? geo.size.width : art > 0 ? min(cap, max(300, art + 2 * hPad)) : cap
VStack(spacing: 0) {
panelView(track, header: true)
.frame(maxWidth: panel == .Art ? .infinity : min(w, geo.size.width), maxHeight: .infinity)
+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.
MARKETING_VERSION: "0.9.0"
VERSION_LABEL: "0.9.0"
CURRENT_PROJECT_VERSION: "27"
CURRENT_PROJECT_VERSION: "28"
# Dev builds override these (build-ipa.sh dev) so they install next to the release app.
APP_ID: org.cdnutter.stemify
APP_NAME: Stemify