mirror of
https://github.com/yattee/yattee.git
synced 2026-10-31 17:07:18 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user