mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
Replace macOS inline player sheet with full-window overlay
When "Play in a separate window" is disabled, the expanded player was a native sheet attached to the main window. AppKit refuses fullscreen with an attached sheet, so pressing F swapped the sheet for an in-window overlay before fullscreening — a visible two-step transition. Present the inline player as the full-window overlay from the start, so fullscreen is just the window's native toggle. This removes the whole sheet-swap machinery (toggleSheetFullScreen with its detach timing, SheetWindowResizer, sheet sizing helpers). - beginInlineOverlay/endInlineOverlay hide/restore the main window toolbar and mirror the window's fullscreen state into the renamed isMacInlinePlayerFullScreen flag via NSWindow notifications, so exits through Esc/green button/Mission Control stay in sync - Collapsing exits fullscreen only if it was entered for the video - Esc in the windowed overlay collapses to the mini bar via a new onCollapse callback (replacing the sheet's default Esc-dismiss) - ContentView registers its hosting window (MainContentWindowReader) so the overlay targets the right window even when the setting is toggled while the Settings window has focus
This commit is contained in:
@@ -115,10 +115,11 @@ final class NavigationCoordinator {
|
||||
/// Whether the player is currently expanding (for animation coordination with mini player).
|
||||
var isPlayerExpanding = false
|
||||
|
||||
/// macOS only: true while the inline player runs in fullscreen overlay
|
||||
/// mode — sheet dismissed, player shown as an overlay in the main window,
|
||||
/// main window native-fullscreen. Set/cleared by ExpandedPlayerWindowManager.
|
||||
var isMacPlayerFullScreenOverlay = false
|
||||
/// macOS only: true while the main window is native-fullscreen for the
|
||||
/// inline player overlay. Mirrors the window's fullscreen state (kept in
|
||||
/// sync by ExpandedPlayerWindowManager via NSWindow fullscreen
|
||||
/// notifications) so player controls update reactively.
|
||||
var isMacInlinePlayerFullScreen = false
|
||||
|
||||
/// Whether the player is currently collapsing (for animation coordination with mini player).
|
||||
var isPlayerCollapsing = false
|
||||
|
||||
Reference in New Issue
Block a user