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:
@@ -47,6 +47,8 @@ enum SettingsKey: String, CaseIterable {
|
||||
// Platform-specific
|
||||
case macPlayerSeparateWindow
|
||||
case macPlayerFloating
|
||||
case macControlsBarOffsetX // Normalized X offset of macOS control bar from default position
|
||||
case macControlsBarOffsetY // Normalized Y offset of macOS control bar from default position
|
||||
case playerSheetAutoResize
|
||||
case listStyle
|
||||
|
||||
@@ -140,6 +142,7 @@ enum SettingsKey: String, CaseIterable {
|
||||
switch self {
|
||||
case .preferredQuality, .cellularQuality, .allowSoftwareDecodedFormats,
|
||||
.macPlayerSeparateWindow, .macPlayerFloating, .listStyle,
|
||||
.macControlsBarOffsetX, .macControlsBarOffsetY,
|
||||
// Home layout — different UI paradigms per platform
|
||||
.homeShortcutOrder, .homeShortcutVisibility, .homeShortcutLayout, .homeShortcutCardStyle,
|
||||
.homeShortcutCardColor, .homeShortcutColorfulPalette, .homeShortcutCustomPaletteColors,
|
||||
|
||||
Reference in New Issue
Block a user