diff --git a/DynamicIsland.xcodeproj/project.pbxproj b/DynamicIsland.xcodeproj/project.pbxproj index 554f95a..d65d181 100644 --- a/DynamicIsland.xcodeproj/project.pbxproj +++ b/DynamicIsland.xcodeproj/project.pbxproj @@ -451,13 +451,13 @@ AUTOMATION_APPLE_EVENTS = NO; CODE_SIGN_ENTITLEMENTS = DynamicIsland/DynamicIsland.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 11; DEVELOPMENT_ASSET_PATHS = "\"DynamicIsland/Preview Content\""; DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=macosx*]" = 9Y64TRM77N; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 3W9U482L92; ENABLE_APP_SANDBOX = NO; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; @@ -523,13 +523,13 @@ AUTOMATION_APPLE_EVENTS = NO; CODE_SIGN_ENTITLEMENTS = DynamicIsland/DynamicIsland.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 11; DEVELOPMENT_ASSET_PATHS = "\"DynamicIsland/Preview Content\""; DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=macosx*]" = 9Y64TRM77N; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 3W9U482L92; ENABLE_APP_SANDBOX = NO; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; diff --git a/DynamicIsland/ContentView.swift b/DynamicIsland/ContentView.swift index 85ac2e7..84c6569 100644 --- a/DynamicIsland/ContentView.swift +++ b/DynamicIsland/ContentView.swift @@ -991,10 +991,10 @@ struct ContentView: View { .background( Image(nsImage: musicManager.albumArt) .resizable() - .scaledToFill() + .aspectRatio(contentMode: .fit) + .clipShape(RoundedRectangle(cornerRadius: musicManager.albumArt.size.width/musicManager.albumArt.size.height > 1.0 ? MusicPlayerImageSizes.cornerRadiusInset.closed/3.0 : MusicPlayerImageSizes.cornerRadiusInset.closed)) ) .clipped() - .clipShape(RoundedRectangle(cornerRadius: MusicPlayerImageSizes.cornerRadiusInset.closed)) .matchedGeometryEffect(id: "albumArt", in: albumArtNamespace) .albumArtFlip(angle: musicManager.flipAngle) albumArtBadge(for: secondary, badgeSize: badgeDisplaySize) diff --git a/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift b/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift index 40ad9e8..39e4cfb 100644 --- a/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift +++ b/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift @@ -296,23 +296,24 @@ struct LockScreenMusicPanel: View { private func albumArtButton(size: CGFloat, cornerRadius: CGFloat) -> some View { Button(action: toggleExpanded) { - ZStack(alignment: .bottomTrailing) { - albumArtImage(size: size, cornerRadius: cornerRadius) - if showAppIcon, let icon = lockScreenAppIcon { - icon - .resizable() - .scaledToFill() - .frame(width: appIconSize, height: appIconSize) - .clipShape(RoundedRectangle(cornerRadius: appIconCornerRadius, style: .continuous)) - .shadow(color: Color.black.opacity(0.35), radius: 6, x: 0, y: 4) - .offset(x: appIconOffset, y: appIconOffset) - .transition(.scale.combined(with: .opacity)) + ZStack(alignment: .bottomTrailing) { + albumArtImage(size: size, cornerRadius: cornerRadius) + if showAppIcon, let icon = lockScreenAppIcon { + icon + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: appIconSize, height: appIconSize) + + .shadow(color: Color.black.opacity(0.35), radius: 6, x: 0, y: 4) + .offset(x: appIconOffset, y: appIconOffset) + .transition(.scale.combined(with: .opacity)) + } } - } - .albumArtFlip(angle: musicManager.flipAngle) - .parallax3D(enableOverride: lockScreenParallaxEnabled, suspended: isParallaxSuspended) - .frame(width: size, height: size) - .background(albumArtBackground(cornerRadius: cornerRadius)) + .albumArtFlip(angle: musicManager.flipAngle) + .parallax3D(enableOverride: lockScreenParallaxEnabled, suspended: isParallaxSuspended) + .frame(width: size) + .background(albumArtBackground(cornerRadius: cornerRadius)) + .clipShape(RoundedRectangle(cornerRadius: musicManager.albumArt.size.width/musicManager.albumArt.size.height > 1.0 ? appIconCornerRadius/3 : appIconCornerRadius, style: .continuous)) } .buttonStyle(PlainButtonStyle()) .opacity(musicManager.isPlaying ? 1 : 0.4) @@ -1049,9 +1050,8 @@ struct LockScreenMusicPanel: View { private func albumArtImage(size: CGFloat, cornerRadius: CGFloat) -> some View { Image(nsImage: musicManager.albumArt) .resizable() - .scaledToFill() - .frame(width: size, height: size) - .clipShape(RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)) + .aspectRatio(contentMode: .fit) + .clipShape(RoundedRectangle(cornerRadius: musicManager.albumArt.size.width/musicManager.albumArt.size.height > 1.0 ? cornerRadius/3 : cornerRadius)) } @ViewBuilder diff --git a/DynamicIsland/components/MinimalisticMusicView.swift b/DynamicIsland/components/MinimalisticMusicView.swift index db0b6b6..473e470 100644 --- a/DynamicIsland/components/MinimalisticMusicView.swift +++ b/DynamicIsland/components/MinimalisticMusicView.swift @@ -94,9 +94,10 @@ struct MinimalisticMusicView: View { Image(nsImage: musicManager.albumArt) .resizable() .aspectRatio(contentMode: .fit) + .clipShape(RoundedRectangle(cornerRadius: musicManager.albumArt.size.width/musicManager.albumArt.size.height > 1.0 ? 4 : 12)) + ) .clipped() - .clipShape(RoundedRectangle(cornerRadius: 18)) // Dramatically increased corner radius for minimalistic mode .albumArtFlip(angle: musicManager.flipAngle) .frame(width: max(0, vm.effectiveClosedNotchHeight - 12), height: max(0, vm.effectiveClosedNotchHeight - 12)) } diff --git a/DynamicIsland/components/Notch/MinimalisticMusicPlayerView.swift b/DynamicIsland/components/Notch/MinimalisticMusicPlayerView.swift index 06d3146..689f8c3 100644 --- a/DynamicIsland/components/Notch/MinimalisticMusicPlayerView.swift +++ b/DynamicIsland/components/Notch/MinimalisticMusicPlayerView.swift @@ -1142,18 +1142,21 @@ struct MinimalisticAlbumArtView: View { Button { musicManager.openMusicApp() } label: { - Color.clear - .aspectRatio(1, contentMode: .fit) - .background( - Image(nsImage: musicManager.albumArt) - .resizable() - .scaledToFill() - ) - .clipped() - .clipShape(RoundedRectangle(cornerRadius: 12)) - .matchedGeometryEffect(id: "albumArt", in: albumArtNamespace) - .albumArtFlip(angle: musicManager.flipAngle) - .parallax3D() + Color.clear + .aspectRatio(1, contentMode: .fit) + .background( + + Image(nsImage: musicManager.albumArt) + .resizable() + .aspectRatio(contentMode: .fit) + .clipShape(RoundedRectangle(cornerRadius: musicManager.albumArt.size.width/musicManager.albumArt.size.height > 1.0 ? 4 : 12)) + + + ) + .clipped() + .matchedGeometryEffect(id: "albumArt", in: albumArtNamespace) + .albumArtFlip(angle: musicManager.flipAngle) + .parallax3D() } .buttonStyle(PlainButtonStyle()) .opacity(musicManager.isPlaying ? 1 : 0.4) diff --git a/DynamicIsland/components/Notch/NotchHomeView.swift b/DynamicIsland/components/Notch/NotchHomeView.swift index d4684e9..a61ff77 100644 --- a/DynamicIsland/components/Notch/NotchHomeView.swift +++ b/DynamicIsland/components/Notch/NotchHomeView.swift @@ -60,15 +60,18 @@ struct AlbumArtView: View { .background( Image(nsImage: musicManager.albumArt) .resizable() - .scaledToFill() + .aspectRatio(contentMode: .fit) + .clipShape( + RoundedRectangle( + cornerRadius: Defaults[.cornerRadiusScaling] + ? musicManager.albumArt.size.width/musicManager.albumArt.size.height > 1.0 ? MusicPlayerImageSizes.cornerRadiusInset.opened/3 : MusicPlayerImageSizes.cornerRadiusInset.opened + : musicManager.albumArt.size.width/musicManager.albumArt.size.height > 1.0 ? MusicPlayerImageSizes.cornerRadiusInset.closed/3 : MusicPlayerImageSizes.cornerRadiusInset.closed + + + ) + ) ) .clipped() - .clipShape( - RoundedRectangle( - cornerRadius: Defaults[.cornerRadiusScaling] - ? MusicPlayerImageSizes.cornerRadiusInset.opened - : MusicPlayerImageSizes.cornerRadiusInset.closed) - ) .scaleEffect(x: 1.3, y: 1.4) .rotationEffect(.degrees(92)) .blur(radius: 40) @@ -110,17 +113,19 @@ struct AlbumArtView: View { .overlay { Image(nsImage: musicManager.albumArt) .resizable() - .scaledToFill() //to ensure the thumbnail will always be within the square icon - + .aspectRatio(contentMode: .fit) + .clipShape( + RoundedRectangle( + cornerRadius: Defaults[.cornerRadiusScaling] + ? musicManager.albumArt.size.width/musicManager.albumArt.size.height > 1.0 ? MusicPlayerImageSizes.cornerRadiusInset.opened/3 : MusicPlayerImageSizes.cornerRadiusInset.opened + : musicManager.albumArt.size.width/musicManager.albumArt.size.height > 1.0 ? MusicPlayerImageSizes.cornerRadiusInset.closed/3 : MusicPlayerImageSizes.cornerRadiusInset.closed + + + ) + ) // ensures that even the rectagular album cover is rounded just like the MacOS media player } .matchedGeometryEffect(id: "albumArt", in: albumArtNamespace) .clipped() - .clipShape( - RoundedRectangle( - cornerRadius: Defaults[.cornerRadiusScaling] - ? MusicPlayerImageSizes.cornerRadiusInset.opened - : MusicPlayerImageSizes.cornerRadiusInset.closed) - ) } @ViewBuilder diff --git a/DynamicIsland/components/Tabs/TabSelectionView.swift b/DynamicIsland/components/Tabs/TabSelectionView.swift index 5763149..bbf791a 100644 --- a/DynamicIsland/components/Tabs/TabSelectionView.swift +++ b/DynamicIsland/components/Tabs/TabSelectionView.swift @@ -105,7 +105,7 @@ struct TabSelectionView: View { return tabsArray } var body: some View { - HStack(spacing: 32) { + HStack(spacing: 24) { ForEach(tabs) { tab in let isSelected = isSelected(tab) let activeAccent = tab.accentColor ?? .white