Default the built-in presets to the corner layout

The built-in presets now use the corner layout, which still falls back
to stacked where it doesn't fit (iPhone, iPad portrait, narrow windows).
In the corner layout the landscape panels open visible unless the preset
says otherwise, on devices that can show it: iPad, macOS, and foldable
iPhones, whose hinge is now remembered once reported. Custom presets and
presets saved without panel settings keep the stacked layout.
This commit is contained in:
Arkadiusz Fal
2026-10-12 18:24:46 +02:00
parent 5026c094be
commit e71bb76f13
4 changed files with 72 additions and 7 deletions

View File

@@ -64,6 +64,7 @@ struct HingeLayoutObserver: ViewModifier {
}
// nil when leaving the hierarchy: keep the last state then
guard let status = context.hinge?.status else { return }
PanelSettings.deviceHasHinge = true
apply(status == .partiallyOpen)
}
} else {
@@ -83,6 +84,7 @@ private struct HingePresenceObserver: ViewModifier {
// nil also when leaving a hinge-providing hierarchy; keep the last value then
guard context.hinge != nil else { return }
hasHinge = true
PanelSettings.deviceHasHinge = true
}
} else {
content