iPad: use the sheet-based layout at every size; drop forced min width
The docked layout clipped on iPad even at iPad-Pro (regular) width because a large macOS min-width hint forced content wider than the screen and the header did not reflow. iPhone is not a target, so gate purely by platform: every iPad size uses the canvas-first / sheet layout, macOS keeps the docked layout. Drop the min-width/min-height frame on iOS so nothing is forced past the screen. Add an isNarrow (horizontalSizeClass == .compact) hook reserved for size-specific tuning of the smaller iPads / split view. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
<key>UILaunchScreen</key>
|
<key>UILaunchScreen</key>
|
||||||
<dict/>
|
<dict/>
|
||||||
<key>UIRequiresFullScreen</key>
|
<key>UIRequiresFullScreen</key>
|
||||||
<true/>
|
<false/>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
@@ -40,6 +40,8 @@
|
|||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -208,8 +208,21 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
|
|
||||||
// MARK: - Body
|
// MARK: - Body
|
||||||
|
|
||||||
/// `true` on narrow widths (iPhone, iPad portrait / split view) — the canvas-first layout.
|
/// `true` on iPad (any size) — the canvas-first layout with composition panels in sheets. The
|
||||||
|
/// docked desktop layout is macOS-only; on iPad it overflowed and clipped even at iPad-Pro
|
||||||
|
/// width, so every iPad size uses the sheet-based layout. macOS always uses the docked layout.
|
||||||
private var isCompact: Bool {
|
private var isCompact: Bool {
|
||||||
|
#if os(iOS)
|
||||||
|
return true
|
||||||
|
#else
|
||||||
|
return false
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `true` on the smaller iPads / split-view widths, where even the canvas-first docked strip
|
||||||
|
/// (mixer + scope + Tempo/Tuner) is tight and more can move into sheets. Reserved for
|
||||||
|
/// size-specific tuning; `.regular` is a full-screen iPad.
|
||||||
|
private var isNarrow: Bool {
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
return horizontalSizeClass == .compact
|
return horizontalSizeClass == .compact
|
||||||
#else
|
#else
|
||||||
@@ -220,9 +233,11 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
public var body: some View {
|
public var body: some View {
|
||||||
rootContent
|
rootContent
|
||||||
.padding(ShoeGazeBuilderView.outerPadding)
|
.padding(ShoeGazeBuilderView.outerPadding)
|
||||||
|
// A large min width is a macOS window sizing hint; on iPad it would force content wider than
|
||||||
|
// the screen and clip it, so the sheet-based iPad layout imposes no minimum width.
|
||||||
.frame(
|
.frame(
|
||||||
minWidth: ShoeGazeBuilderView.minWidth + ShoeGazeBuilderView.librarySidebarReserve,
|
minWidth: isCompact ? nil : ShoeGazeBuilderView.minWidth + ShoeGazeBuilderView.librarySidebarReserve,
|
||||||
minHeight: ShoeGazeBuilderView.minHeight
|
minHeight: isCompact ? nil : ShoeGazeBuilderView.minHeight
|
||||||
)
|
)
|
||||||
.background(
|
.background(
|
||||||
Color(
|
Color(
|
||||||
|
|||||||
Reference in New Issue
Block a user