mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
Allow dragging the macOS player controls bar to reposition it
The glass controls capsule can now be dragged anywhere over the video. Position is stored as a fraction of the container size so it survives window resizes and aspect-ratio driven sheet resizes, persists across sessions via SettingsManager, and snaps back magnetically when dropped near the default bottom-center spot. Travel is clamped so the capsule stays inside the player and never overlaps the top button row. A mouseDownCanMoveWindow=false backing view keeps the window's movable-by-background behavior from swallowing the drag.
This commit is contained in:
@@ -74,6 +74,8 @@ final class SettingsManager {
|
||||
#if os(macOS)
|
||||
var _macPlayerSeparateWindow: Bool?
|
||||
var _macPlayerFloating: Bool?
|
||||
var _macControlsBarOffsetX: Double?
|
||||
var _macControlsBarOffsetY: Double?
|
||||
var _playerSheetAutoResize: Bool?
|
||||
#endif
|
||||
|
||||
@@ -460,6 +462,8 @@ final class SettingsManager {
|
||||
#if os(macOS)
|
||||
_macPlayerSeparateWindow = nil
|
||||
_macPlayerFloating = nil
|
||||
_macControlsBarOffsetX = nil
|
||||
_macControlsBarOffsetY = nil
|
||||
_playerSheetAutoResize = nil
|
||||
#endif
|
||||
// miniPlayerShowVideo and miniPlayerVideoTapAction moved to preset
|
||||
|
||||
Reference in New Issue
Block a user