mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
Redesign macOS now-playing bar as centered Liquid Glass capsule
- Replace the full-width material overlay bar with a compact, centered capsule (Apple Music style) via a macOS-specific macOSCapsuleLayout - Extend glassBackground() to use real Liquid Glass on macOS 26 with a material fallback on macOS 15-25 (mirrors the PlayerOverlayButton pattern) - Remove the duplicate close button (close now comes only from the configurable button set) - Keep the capsule visible in the main window while the separate player window is open (window mode), still hidden in sheet mode
This commit is contained in:
@@ -119,14 +119,17 @@ struct ContentView: View {
|
||||
let playerState = appEnvironment.playerService.state
|
||||
let hasActiveVideo = playerState.currentVideo != nil
|
||||
let isExpanded = appEnvironment.navigationCoordinator.isPlayerExpanded
|
||||
// The expanded player is a separate window in window mode, so keep the capsule
|
||||
// visible alongside it. In sheet mode the sheet covers the window, so hide it.
|
||||
let usesWindow = appEnvironment.settingsManager.macPlayerMode.usesWindow
|
||||
|
||||
if hasActiveVideo && !isExpanded {
|
||||
if hasActiveVideo && (!isExpanded || usesWindow) {
|
||||
VStack(spacing: 0) {
|
||||
Spacer()
|
||||
MiniPlayerView()
|
||||
}
|
||||
// Add padding for tab bar
|
||||
.padding(.bottom, 49)
|
||||
// Float the capsule above the bottom edge (macOS uses a sidebar, not a tab bar)
|
||||
.padding(.bottom, 16)
|
||||
// Use move-only transition (no opacity) to prevent thumbnail flash during collapse
|
||||
.transition(.move(edge: .bottom))
|
||||
.animation(.spring(response: 0.3), value: hasActiveVideo)
|
||||
|
||||
Reference in New Issue
Block a user