iOS dev 30: hide Duo swap, Library Layout in Settings, Settings width on Duo, centred stem faders, folded spacing, no folded header menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
29a1742f8d
commit
150e47a305
8 files changed
+130
-84
No files matched your search
@@ -298,21 +298,31 @@ struct Loaded<T, Content: View>: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// Swapping Now Playing to the other side of the Duo's hinge. Off for now: no button, and a
|
||||
/// saved swap is ignored.
|
||||
let duoSwapEnabled = false
|
||||
|
||||
/// Split at the iPhone Duo's hinge, a tab's rows run right up to it (no inset is real on that side).
|
||||
struct HingeEdge: ViewModifier {
|
||||
@Environment(Ui.self) private var ui
|
||||
@AppStorage("duoSwap") private var swap = false
|
||||
func body(content: Content) -> some View {
|
||||
content.ignoresSafeArea(.container, edges: ui.split ? (swap && duoSwapEnabled ? .leading : .trailing) : [])
|
||||
}
|
||||
}
|
||||
|
||||
/// A plain scrolling page with a large title, like the Android shell's Page.
|
||||
struct Page<Content: View>: View {
|
||||
let title: String
|
||||
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) : [])
|
||||
.modifier(HingeEdge())
|
||||
.background(p.bg)
|
||||
.navigationTitle(title)
|
||||
.navigationBarTitleDisplayMode(large ? .large : .inline)
|
||||
|
||||
Reference in new issue
Block a user