Split the corner layout on the hinge when partially open

On a half-open foldable the side column takes exactly the trailing half,
so the split lands on the hinge. Fully open, the column can now be
resized up to half the width. A re-presented player seeds the hinge
state from the last report so it doesn't animate into the split.
This commit is contained in:
Arkadiusz Fal
2026-10-09 23:19:39 +02:00
parent 4d690d6b71
commit fe109394df
4 changed files with 55 additions and 17 deletions

View File

@@ -100,7 +100,9 @@ struct ExpandedPlayerSheet: View {
/// Foldable hinge partially open (iPhone Duo laptop position): the
/// fullscreen portrait layout keeps the video on the upper half and
/// moves every control to the lower half.
@State var isTabletopHinge = false
/// Seeded from the last hinge report so a re-presented player starts in
/// the right layout instead of animating into it.
@State var isTabletopHinge = HingeLayoutObserver.lastKnownTabletop
#endif
#if os(iOS) || os(macOS)