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