Keep the macOS corner player layout from being squeezed

The separate player window could be resized below what the corner layout
needs. Free resize now floors at the corner layout's minimum (its width
threshold, the narrowest side column plus a video column wide enough for
the control bar, and 600pt tall), and an undersized window grows to it
when the corner layout takes over. The video column minimum is 560pt on
macOS so the control bar capsule fits.

The control bar's fixed 650pt frame also widened the controls stack past
a narrower video column, clipping the top bar's avatar and close button;
the frame is now capped to the container width.
This commit is contained in:
Arkadiusz Fal
2026-10-13 23:18:47 +02:00
parent a2ee7d5363
commit 7f4555dc2e
4 changed files with 61 additions and 6 deletions

View File

@@ -330,7 +330,10 @@ struct MacOSPlayerControlsView: View {
// AppKit claims drags on the glass capsule as window moves
// and the reposition gesture never fires.
.background(WindowDragBlockingView())
.frame(width: 650)
// Never wider than the container: a wider bar frame
// widens the whole VStack, and the top bar then
// overflows (and is clipped) on both sides.
.frame(width: min(650, geometry.size.width))
.padding(.bottom, BarDrag.bottomPadding)
.offset(barOffset(in: geometry.size))
.gesture(barDragGesture(in: geometry.size))