mirror of
https://github.com/yattee/yattee.git
synced 2026-07-21 14:52:03 +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:
@@ -64,23 +64,23 @@ struct GlassBackgroundModifier: ViewModifier {
|
||||
}
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
#if os(iOS)
|
||||
if #available(iOS 26.0, *) {
|
||||
#if os(iOS) || os(macOS)
|
||||
if #available(iOS 26.0, macOS 26.0, *) {
|
||||
content.modifier(LiquidGlassModifier(style: style, shape: shape, colorScheme: colorScheme))
|
||||
} else {
|
||||
content.modifier(FallbackGlassModifier(shape: shape, material: fallbackMaterial, colorScheme: colorScheme))
|
||||
}
|
||||
#else
|
||||
// macOS / tvOS don't have glassEffect, always use fallback material
|
||||
// tvOS doesn't have glassEffect, always use fallback material
|
||||
content.modifier(FallbackGlassModifier(shape: shape, material: fallbackMaterial, colorScheme: colorScheme))
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - iOS 26+ Liquid Glass
|
||||
// MARK: - iOS 26+ / macOS 26+ Liquid Glass
|
||||
|
||||
#if os(iOS)
|
||||
@available(iOS 26.0, *)
|
||||
#if os(iOS) || os(macOS)
|
||||
@available(iOS 26.0, macOS 26.0, *)
|
||||
private struct LiquidGlassModifier: ViewModifier {
|
||||
let style: GlassStyle
|
||||
let shape: GlassShape
|
||||
|
||||
Reference in New Issue
Block a user