From 90b5dae3bad0b389893a2f0788b8d070f26ec47f Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Tue, 31 Mar 2026 20:35:47 +0800 Subject: [PATCH 1/3] Fixed 1 color picker bug made home UI padding --- DynamicIsland/ContentView.swift | 2 +- DynamicIsland/Localizable.xcstrings | 82 ++----------------- .../LockScreen/LockScreenMusicPanel.swift | 8 +- .../components/MinimalisticMusicView.swift | 1 + .../Notch/DynamicIslandHeader.swift | 7 +- .../Notch/MinimalisticMusicPlayerView.swift | 8 +- .../components/Notch/NotchHomeView.swift | 25 +++--- .../components/Settings/SettingsView.swift | 15 +++- DynamicIsland/components/Tabs/TabButton.swift | 1 - .../components/Tabs/TabSelectionView.swift | 17 +--- .../extensions/View+Parallax3D.swift | 12 ++- DynamicIsland/models/Constants.swift | 2 +- 12 files changed, 58 insertions(+), 122 deletions(-) diff --git a/DynamicIsland/ContentView.swift b/DynamicIsland/ContentView.swift index 8909c88..85ac2e7 100644 --- a/DynamicIsland/ContentView.swift +++ b/DynamicIsland/ContentView.swift @@ -991,7 +991,7 @@ struct ContentView: View { .background( Image(nsImage: musicManager.albumArt) .resizable() - .aspectRatio(contentMode: .fit) + .scaledToFill() ) .clipped() .clipShape(RoundedRectangle(cornerRadius: MusicPlayerImageSizes.cornerRadiusInset.closed)) diff --git a/DynamicIsland/Localizable.xcstrings b/DynamicIsland/Localizable.xcstrings index a6ab283..9950476 100644 --- a/DynamicIsland/Localizable.xcstrings +++ b/DynamicIsland/Localizable.xcstrings @@ -928,6 +928,9 @@ } } } + }, + "%0.1f" : { + }, "%d%%" : { "localizations" : { @@ -1853,10 +1856,6 @@ } } }, - "±10 Seconds" : { - "comment" : "Display name for the \"±10 Seconds\" music skip behavior option.", - "isCommentAutoGenerated" : true - }, "0" : { "comment" : "A label displayed in a circular gauge to indicate the minimum battery level.", "isCommentAutoGenerated" : true, @@ -2330,10 +2329,6 @@ } } }, - "Accent" : { - "comment" : "Display name for the caps lock indicator tint mode.", - "isCommentAutoGenerated" : true - }, "Accent color" : { "localizations" : { "ar" : { @@ -2737,10 +2732,6 @@ "comment" : "Label for the active GPU field in the GPU usage dashboard.", "isCommentAutoGenerated" : true }, - "Adaptive gradient" : { - "comment" : "Display name for the timer icon color mode: adaptive gradient.", - "isCommentAutoGenerated" : true - }, "Add" : { "localizations" : { "ar" : { @@ -4579,10 +4570,6 @@ } } }, - "Apple Music" : { - "comment" : "Media controller type for Apple Music", - "isCommentAutoGenerated" : true - }, "Applies the notch-style parallax effect to the lock screen media widget album art." : { "localizations" : { "ko" : { @@ -5164,10 +5151,6 @@ } } }, - "Bar" : { - "comment" : "Name of the timer progress style that shows a horizontal bar.", - "isCommentAutoGenerated" : true - }, "Battery" : { "localizations" : { "ar" : { @@ -10531,10 +10514,6 @@ } } }, - "Digital" : { - "comment" : "The display name for the \"Digital\" reminder presentation style.", - "isCommentAutoGenerated" : true - }, "Dimensions" : { "localizations" : { "ko" : { @@ -11892,9 +11871,6 @@ }, "Enable album art parallax" : { - }, - "Enable album art parallax effect" : { - }, "Enable and style the media controls that appear above the system clock when the screen is locked." : { "comment" : "A description of the media panel settings in the lock screen settings view.", @@ -14849,10 +14825,6 @@ } } }, - "Green" : { - "comment" : "Display name for the green caps lock indicator tint mode.", - "isCommentAutoGenerated" : true - }, "Height:" : { "extractionState" : "stale", "localizations" : { @@ -19228,6 +19200,7 @@ } }, "Minutes" : { + "extractionState" : "stale", "localizations" : { "fr" : { "stringUnit" : { @@ -21731,10 +21704,6 @@ } } }, - "Now Playing" : { - "comment" : "Name of the media controller type for the \"Now Playing\" option.", - "isCommentAutoGenerated" : true - }, "Number of lines kept in the scrollback buffer. Higher values use more memory." : { "localizations" : { "ko" : { @@ -22281,10 +22250,6 @@ } } }, - "Panel" : { - "comment" : "Display name for the clipboard display mode \"Panel\".", - "isCommentAutoGenerated" : true - }, "Panel mode shows clipboard in a floating window near the notch." : { "comment" : "A description of the \"Panel\" clipboard display mode.", "isCommentAutoGenerated" : true, @@ -22340,6 +22305,9 @@ } } } + }, + "Parallax Effect Intensity" : { + }, "Pause" : { "shouldTranslate" : false @@ -24560,10 +24528,6 @@ } } }, - "Ring" : { - "comment" : "The name of the timer progress style that shows a ring shape.", - "isCommentAutoGenerated" : true - }, "Rotation:" : { "extractionState" : "stale", "localizations" : { @@ -25611,10 +25575,6 @@ } } }, - "Separate Tab" : { - "comment" : "Display name for the clipboard display mode option to open the clipboard in a separate tab.", - "isCommentAutoGenerated" : true - }, "Separate Tab mode integrates Copied Items and Notes into a single view. If both are enabled, Notes appear on the right and Clipboard on the left." : { "comment" : "A description of the \"Separate Tab\" clipboard display mode.", "isCommentAutoGenerated" : true, @@ -26974,14 +26934,6 @@ } } }, - "Shows screen assistant as a dropdown attached to the AI button" : { - "comment" : "Description of the screen assistant display mode option that shows the screen assistant as a dropdown attached to the AI button.", - "isCommentAutoGenerated" : true - }, - "Shows screen assistant in a floating panel near the notch" : { - "comment" : "Description of the screen assistant display mode option that shows the screen assistant in a floating panel near the notch.", - "isCommentAutoGenerated" : true - }, "Shows the model's reasoning process before the final answer" : { "localizations" : { "fr" : { @@ -27093,10 +27045,6 @@ } } }, - "Skip forward or backward by ten seconds" : { - "comment" : "Description of a music skip behavior option.", - "isCommentAutoGenerated" : true - }, "Slider color" : { "localizations" : { "ar" : { @@ -27704,10 +27652,6 @@ } } }, - "Spotify" : { - "comment" : "Spotify media controller type.", - "isCommentAutoGenerated" : true - }, "Square" : { "localizations" : { "ar" : { @@ -27853,10 +27797,6 @@ } } }, - "Standard previous/next track controls" : { - "comment" : "Description of the music skip behavior option to use standard previous/next track controls.", - "isCommentAutoGenerated" : true - }, "Start" : { "localizations" : { "fr" : { @@ -29697,10 +29637,6 @@ }, "shouldTranslate" : false }, - "Track Skip" : { - "comment" : "Display name for the \"Track Skip\" music skip behavior.", - "isCommentAutoGenerated" : true - }, "Transform" : { "extractionState" : "stale", "localizations" : { @@ -32089,10 +32025,6 @@ } } }, - "Youtube Music" : { - "comment" : "Spotify music service.", - "isCommentAutoGenerated" : true - }, "YouTube Music requires this third-party app to be installed: " : { "localizations" : { "ar" : { diff --git a/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift b/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift index 4dc6eae..40ad9e8 100644 --- a/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift +++ b/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift @@ -301,7 +301,7 @@ struct LockScreenMusicPanel: View { if showAppIcon, let icon = lockScreenAppIcon { icon .resizable() - .aspectRatio(contentMode: .fill) + .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) @@ -310,7 +310,7 @@ struct LockScreenMusicPanel: View { } } .albumArtFlip(angle: musicManager.flipAngle) - .parallax3D(magnitude: 12, enableOverride: lockScreenParallaxEnabled, suspended: isParallaxSuspended) + .parallax3D(enableOverride: lockScreenParallaxEnabled, suspended: isParallaxSuspended) .frame(width: size, height: size) .background(albumArtBackground(cornerRadius: cornerRadius)) } @@ -1049,7 +1049,7 @@ struct LockScreenMusicPanel: View { private func albumArtImage(size: CGFloat, cornerRadius: CGFloat) -> some View { Image(nsImage: musicManager.albumArt) .resizable() - .aspectRatio(contentMode: .fit) + .scaledToFill() .frame(width: size, height: size) .clipShape(RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)) } @@ -1082,7 +1082,7 @@ struct LockScreenMusicPanel: View { } private var appIconCornerRadius: CGFloat { - isExpanded ? 18 : 10 + isExpanded ? 18 : 12 } private var appIconOffset: CGFloat { diff --git a/DynamicIsland/components/MinimalisticMusicView.swift b/DynamicIsland/components/MinimalisticMusicView.swift index 43b8a13..db0b6b6 100644 --- a/DynamicIsland/components/MinimalisticMusicView.swift +++ b/DynamicIsland/components/MinimalisticMusicView.swift @@ -63,6 +63,7 @@ struct MinimalisticMusicView: View { // Lyrics under the author name (same font size as author) if enableLyrics { lyricsLineView + .font(.system(size: 11, weight: .regular)) } } .frame(width: geo.size.width, height: geo.size.height, alignment: .center) diff --git a/DynamicIsland/components/Notch/DynamicIslandHeader.swift b/DynamicIsland/components/Notch/DynamicIslandHeader.swift index 34e4610..c9eda7b 100644 --- a/DynamicIsland/components/Notch/DynamicIslandHeader.swift +++ b/DynamicIsland/components/Notch/DynamicIslandHeader.swift @@ -34,6 +34,7 @@ struct DynamicIslandHeader: View { @Default(.enableTimerFeature) var enableTimerFeature @Default(.timerDisplayMode) var timerDisplayMode @Default(.showClipboardIcon) var showClipboardIcon + @Default(.showColorPickerIcon) var showColorPickerIcon @Default(.clipboardDisplayMode) var clipboardDisplayMode var body: some View { @@ -50,6 +51,8 @@ struct DynamicIslandHeader: View { .blur(radius: vm.notchState == .closed ? 20 : 0) .animation(.smooth.delay(0.1), value: vm.notchState) .zIndex(2) + .padding(8) + } if vm.notchState == .open && !Defaults[.enableMinimalisticUI] { @@ -128,7 +131,7 @@ struct DynamicIslandHeader: View { } // ColorPicker button - if Defaults[.enableColorPickerFeature] { + if Defaults[.enableColorPickerFeature] && showColorPickerIcon{ Button(action: { switch Defaults[.colorPickerDisplayMode] { case .panel: @@ -293,7 +296,7 @@ private extension DynamicIslandHeader { Defaults[.settingsIconInNotch] && Defaults[.enableClipboardManager] && Defaults[.showClipboardIcon] - && Defaults[.enableColorPickerFeature] + && Defaults[.showColorPickerIcon] && Defaults[.enableTimerFeature] } } diff --git a/DynamicIsland/components/Notch/MinimalisticMusicPlayerView.swift b/DynamicIsland/components/Notch/MinimalisticMusicPlayerView.swift index fc57c91..06d3146 100644 --- a/DynamicIsland/components/Notch/MinimalisticMusicPlayerView.swift +++ b/DynamicIsland/components/Notch/MinimalisticMusicPlayerView.swift @@ -374,7 +374,7 @@ struct MinimalisticMusicPlayerView: View { private struct MinimalisticReminderEventListView: View { let reminders: [ReminderLiveActivityManager.ReminderEntry] - private let textFont = Font.system(size: 13, weight: .semibold) + private let textFont = Font.system(size: 13, weight: .regular) private let separatorSpacing: CGFloat = 10 var body: some View { @@ -1128,7 +1128,7 @@ struct MinimalisticAlbumArtView: View { .background( Image(nsImage: musicManager.albumArt) .resizable() - .aspectRatio(contentMode: .fit) + .scaledToFill() ) .clipped() .clipShape(RoundedRectangle(cornerRadius: 12)) @@ -1147,13 +1147,13 @@ struct MinimalisticAlbumArtView: View { .background( Image(nsImage: musicManager.albumArt) .resizable() - .aspectRatio(contentMode: .fit) + .scaledToFill() ) .clipped() .clipShape(RoundedRectangle(cornerRadius: 12)) .matchedGeometryEffect(id: "albumArt", in: albumArtNamespace) .albumArtFlip(angle: musicManager.flipAngle) - .parallax3D(magnitude: 12) + .parallax3D() } .buttonStyle(PlainButtonStyle()) .opacity(musicManager.isPlaying ? 1 : 0.4) diff --git a/DynamicIsland/components/Notch/NotchHomeView.swift b/DynamicIsland/components/Notch/NotchHomeView.swift index 09d60e5..d4684e9 100644 --- a/DynamicIsland/components/Notch/NotchHomeView.swift +++ b/DynamicIsland/components/Notch/NotchHomeView.swift @@ -33,7 +33,6 @@ struct MusicPlayerView: View { var body: some View { HStack(alignment: .top, spacing: 12) { AlbumArtView(vm: vm, albumArtNamespace: albumArtNamespace) - .padding(.all, 5) MusicControlsView() .frame(maxWidth: .infinity, alignment: .leading) } @@ -61,7 +60,7 @@ struct AlbumArtView: View { .background( Image(nsImage: musicManager.albumArt) .resizable() - .aspectRatio(contentMode: .fit) + .scaledToFill() ) .clipped() .clipShape( @@ -86,7 +85,9 @@ struct AlbumArtView: View { appIconOverlay } .albumArtFlip(angle: musicManager.flipAngle) - .parallax3D(magnitude: 12) + .parallax3D() + .padding(.bottom, -5) + } .buttonStyle(PlainButtonStyle()) .scaleEffect(musicManager.isPlaying ? 1 : 0.85) @@ -109,7 +110,8 @@ struct AlbumArtView: View { .overlay { Image(nsImage: musicManager.albumArt) .resizable() - .aspectRatio(contentMode: .fit) + .scaledToFill() //to ensure the thumbnail will always be within the square icon + } .matchedGeometryEffect(id: "albumArt", in: albumArtNamespace) .clipped() @@ -126,8 +128,8 @@ struct AlbumArtView: View { if vm.notchState == .open && !musicManager.usingAppIconForArtwork { AppIcon(for: musicManager.bundleIdentifier ?? "com.apple.Music") .resizable() - .aspectRatio(contentMode: .fill) - .frame(width: 30, height: 30) + .scaledToFill() + .frame(width: 36, height: 36) .offset(x: 10, y: 10) .transition(.scale.combined(with: .opacity).animation(.bouncy.delay(0.3))) .zIndex(2) @@ -207,9 +209,9 @@ struct MusicControlsView: View { MarqueeText( lyricsBinding, - font: .headline, + font: .system(size: 12, weight: .regular), nsFont: .headline, - textColor: .white.opacity(0.8), + textColor: .white.opacity(0.7), minDuration: 0.35, frameWidth: width ) @@ -605,6 +607,7 @@ struct NotchHomeView: View { .combined(with: .blurReplace.animation(.smooth.speed(0.9))) .combined(with: .move(edge: .top))) .blur(radius: vm.notchState == .closed ? 30 : 0) + .padding(8) //Put the main padding here for consistency!!! } private var minimalisticOverridePayload: ExtensionNotchExperiencePayload? { @@ -713,6 +716,7 @@ struct MusicSliderView: View { LiveStreamProgressIndicator(tint: sliderTint) .frame(maxWidth: .infinity) .frame(height: sliderFrameHeight) + case .inline: HStack(spacing: 10) { Spacer() @@ -720,6 +724,7 @@ struct MusicSliderView: View { LiveStreamProgressIndicator(tint: sliderTint) .frame(maxWidth: .infinity) .frame(height: sliderFrameHeight) + Spacer() .frame(width: 48) } @@ -748,10 +753,10 @@ struct MusicSliderView: View { ) } - private var sliderTint: Color { + private var sliderTint: Color {// switch Defaults[.sliderColor] { case .albumArt: - return Color(nsColor: color).ensureMinimumBrightness(factor: 0.8) + return Color(nsColor: color).ensureMinimumBrightness(factor: 0.6) case .accent: return .accentColor case .white: diff --git a/DynamicIsland/components/Settings/SettingsView.swift b/DynamicIsland/components/Settings/SettingsView.swift index 624d355..9fafcf8 100644 --- a/DynamicIsland/components/Settings/SettingsView.swift +++ b/DynamicIsland/components/Settings/SettingsView.swift @@ -2443,6 +2443,9 @@ struct Media: View { @Default(.lockScreenMusicAlbumParallaxEnabled) private var lockScreenMusicAlbumParallaxEnabled @Default(.showStandardMediaControls) private var showStandardMediaControls @Default(.autoHideInactiveNotchMediaPlayer) private var autoHideInactiveNotchMediaPlayer + @Default(.parallaxEffectIntensity) private var parallaxEffectIntensity + + @ObservedObject private var musicManager = MusicManager.shared private var isAppleMusicActive: Bool { @@ -2587,10 +2590,18 @@ struct Media: View { Text("Enable lyrics") } .settingsHighlight(id: highlightID("Enable lyrics")) - Defaults.Toggle(key: .enableParallaxEffect) { - Text("Enable album art parallax effect") + + //Parallax Effect Intensity to control how much parallax is wanted + Slider(value: $parallaxEffectIntensity, in: 0...12, step: 1.0) { + HStack { + Text("Parallax Effect Intensity") + Spacer() + Text("\(parallaxEffectIntensity, specifier: "%0.1f")") + .foregroundStyle(.secondary) + } } .settingsHighlight(id: highlightID("Enable album art parallax effect")) + Picker("Sneak Peek Style", selection: $sneakPeekStyles){ ForEach(SneakPeekStyle.allCases) { style in Text(style.rawValue).tag(style) diff --git a/DynamicIsland/components/Tabs/TabButton.swift b/DynamicIsland/components/Tabs/TabButton.swift index c6f59a2..903bfa4 100644 --- a/DynamicIsland/components/Tabs/TabButton.swift +++ b/DynamicIsland/components/Tabs/TabButton.swift @@ -31,7 +31,6 @@ struct TabButton: View { var body: some View { Button(action: onClick) { Image(systemName: icon) - .padding(.horizontal, 15) .contentShape(Capsule()) } .buttonStyle(PlainButtonStyle()) diff --git a/DynamicIsland/components/Tabs/TabSelectionView.swift b/DynamicIsland/components/Tabs/TabSelectionView.swift index 03a0d09..5763149 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: 0) { + HStack(spacing: 32) { ForEach(tabs) { tab in let isSelected = isSelected(tab) let activeAccent = tab.accentColor ?? .white @@ -117,23 +117,10 @@ struct TabSelectionView: View { } .frame(height: 26) .foregroundStyle(isSelected ? activeAccent : .gray) - .background { - if isSelected { - Capsule() - .fill((tab.accentColor ?? Color(nsColor: .secondarySystemFill)).opacity(0.25)) - .shadow(color: (tab.accentColor ?? .clear).opacity(0.4), radius: 8) - .matchedGeometryEffect(id: "capsule", in: animation) - } else { - Capsule() - .fill(Color.clear) - .matchedGeometryEffect(id: "capsule", in: animation) - .hidden() - } - } + } } .animation(.smooth(duration: 0.3), value: coordinator.currentView) - .clipShape(Capsule()) .onAppear { ensureValidSelection(with: tabs) } diff --git a/DynamicIsland/extensions/View+Parallax3D.swift b/DynamicIsland/extensions/View+Parallax3D.swift index 81c2752..35d2759 100644 --- a/DynamicIsland/extensions/View+Parallax3D.swift +++ b/DynamicIsland/extensions/View+Parallax3D.swift @@ -22,17 +22,16 @@ import AppKit import Defaults struct ParallaxMotionModifier: ViewModifier { - var magnitude: Double var enableOverride: Bool? var isSuspended: Bool - @Default(.enableParallaxEffect) var enableParallaxEffect + @Default(.parallaxEffectIntensity) var parallaxEffectIntensity @State private var offset: CGSize = .zero @State private var isHovering = false @State private var viewSize: CGSize = .zero func body(content: Content) -> some View { - if isSuspended || !(enableOverride ?? enableParallaxEffect) { + if isSuspended || !(enableOverride ?? (parallaxEffectIntensity > 0.0)) { content } else { content @@ -69,11 +68,11 @@ struct ParallaxMotionModifier: ViewModifier { } } .rotation3DEffect( - .degrees(offset.height * magnitude), // Y movement rotates around X axis + .degrees(offset.height * parallaxEffectIntensity), // Y movement rotates around X axis axis: (x: 1, y: 0, z: 0) ) .rotation3DEffect( - .degrees(offset.width * -magnitude), // X movement rotates around Y axis (inverted to look naturally) + .degrees(offset.width * -parallaxEffectIntensity), // X movement rotates around Y axis (inverted to look naturally) axis: (x: 0, y: 1, z: 0) ) .scaleEffect(isHovering ? 1.02 : 1.0) // Subtle scale up on hover @@ -83,10 +82,9 @@ struct ParallaxMotionModifier: ViewModifier { extension View { func parallax3D( - magnitude: Double = 10, enableOverride: Bool? = nil, suspended: Bool = false ) -> some View { - modifier(ParallaxMotionModifier(magnitude: magnitude, enableOverride: enableOverride, isSuspended: suspended)) + modifier(ParallaxMotionModifier(enableOverride: enableOverride, isSuspended: suspended)) } } diff --git a/DynamicIsland/models/Constants.swift b/DynamicIsland/models/Constants.swift index 628253f..771f3ea 100644 --- a/DynamicIsland/models/Constants.swift +++ b/DynamicIsland/models/Constants.swift @@ -776,7 +776,7 @@ extension Defaults.Keys { static let sneakPeekStyles = Key("sneakPeekStyles", default: .standard) static let showSneakPeekOnTrackChange = Key("showSneakPeekOnTrackChange", default: true) static let enableFullscreenMediaDetection = Key("enableFullscreenMediaDetection", default: true) - static let enableParallaxEffect = Key("enableParallaxEffect", default: true) + static let parallaxEffectIntensity = Key("parallaxEffectIntensity", default: 6.0) static let waitInterval = Key("waitInterval", default: 3) static let showShuffleAndRepeat = Key("showShuffleAndRepeat", default: true) static let showMediaOutputControl = Key("showMediaOutputControl", default: true) From 034ec9e4450bf58ad0c4b240a6951c612d902e5f Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Tue, 31 Mar 2026 22:27:07 +0800 Subject: [PATCH 2/3] Chnaged the music thumbnails to be exactly like the default MacOS media player thumbnails --- DynamicIsland.xcodeproj/project.pbxproj | 8 ++-- DynamicIsland/ContentView.swift | 4 +- .../LockScreen/LockScreenMusicPanel.swift | 38 +++++++++---------- .../components/MinimalisticMusicView.swift | 3 +- .../Notch/MinimalisticMusicPlayerView.swift | 27 +++++++------ .../components/Notch/NotchHomeView.swift | 35 +++++++++-------- .../components/Tabs/TabSelectionView.swift | 2 +- 7 files changed, 63 insertions(+), 54 deletions(-) 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 From a78e13e510a9475ed6f3433546f03e2888626393 Mon Sep 17 00:00:00 2001 From: Hariharan Mudaliar Date: Sun, 5 Apr 2026 21:01:53 +0530 Subject: [PATCH 3/3] Update stuff --- DynamicIsland.xcodeproj/project.pbxproj | 33 +++++++++---------- .../components/Tabs/TabSelectionView.swift | 1 + 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/DynamicIsland.xcodeproj/project.pbxproj b/DynamicIsland.xcodeproj/project.pbxproj index d65d181..021b45f 100644 --- a/DynamicIsland.xcodeproj/project.pbxproj +++ b/DynamicIsland.xcodeproj/project.pbxproj @@ -27,7 +27,6 @@ 7EE1D73D2E6B1E0B00997219 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7EE1D73C2E6B1E0B00997219 /* ApplicationServices.framework */; }; 7EE1D73F2E6B1E1200997219 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7EE1D73E2E6B1E1200997219 /* IOKit.framework */; }; 7EF19C172F577040005B9929 /* SwiftTerm in Frameworks */ = {isa = PBXBuildFile; productRef = 7EF19C162F577040005B9929 /* SwiftTerm */; }; - 7EF1D4B92FFFCE3C008D2C32 /* ExtensionEventBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EF1D4B82FFFCE3C008D2C32 /* ExtensionEventBridge.swift */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -54,7 +53,6 @@ 7E9911AF2EFD7D1B002EDFD5 /* Reindeer.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = Reindeer.json; sourceTree = ""; }; 7EE1D73C2E6B1E0B00997219 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; }; 7EE1D73E2E6B1E1200997219 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 7EF1D4B82FFFCE3C008D2C32 /* ExtensionEventBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ExtensionEventBridge.swift; path = DynamicIsland/managers/Extensions/ExtensionEventBridge.swift; sourceTree = SOURCE_ROOT; }; F4C1DD09EC134302938E84F6 /* MediaRemoteAdapter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaRemoteAdapter.framework; path = Frameworks/MediaRemoteAdapter.framework; sourceTree = SOURCE_ROOT; }; F54406E72CD4987A00C7AFD9 /* Atoll.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Atoll.app; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -67,6 +65,13 @@ ); target = F54406E62CD4987A00C7AFD9 /* DynamicIsland */; }; + 7EA69B212F5B100000EB2D16 /* Exceptions for "DynamicIsland" folder in "DynamicIsland" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = F54406E62CD4987A00C7AFD9 /* DynamicIsland */; + }; /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet section */ @@ -94,6 +99,9 @@ }; F54406E92CD4987A00C7AFD9 /* DynamicIsland */ = { isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 7EA69B212F5B100000EB2D16 /* Exceptions for "DynamicIsland" folder in "DynamicIsland" target */, + ); path = DynamicIsland; sourceTree = ""; }; @@ -123,14 +131,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 7E07AFF12F181892003A8B1B /* Recovered References */ = { - isa = PBXGroup; - children = ( - 7EF1D4B82FFFCE3C008D2C32 /* ExtensionEventBridge.swift */, - ); - name = "Recovered References"; - sourceTree = ""; - }; 7E81303F2E3FB40500E08F3F /* mediaremote-adapter */ = { isa = PBXGroup; children = ( @@ -173,7 +173,6 @@ 7E81303F2E3FB40500E08F3F /* mediaremote-adapter */, F54406E92CD4987A00C7AFD9 /* DynamicIsland */, F54406E82CD4987A00C7AFD9 /* Products */, - 7E07AFF12F181892003A8B1B /* Recovered References */, ); sourceTree = ""; }; @@ -296,6 +295,7 @@ /* Begin PBXShellScriptBuildPhase section */ 7EFAA8AA2F6F12F3000A99E8 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -318,7 +318,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 7EF1D4B92FFFCE3C008D2C32 /* ExtensionEventBridge.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -451,13 +450,11 @@ AUTOMATION_APPLE_EVENTS = NO; CODE_SIGN_ENTITLEMENTS = DynamicIsland/DynamicIsland.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 11; DEVELOPMENT_ASSET_PATHS = "\"DynamicIsland/Preview Content\""; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=macosx*]" = 3W9U482L92; + DEVELOPMENT_TEAM = 9Y64TRM77N; ENABLE_APP_SANDBOX = NO; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; @@ -523,13 +520,13 @@ AUTOMATION_APPLE_EVENTS = NO; CODE_SIGN_ENTITLEMENTS = DynamicIsland/DynamicIsland.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 11; DEVELOPMENT_ASSET_PATHS = "\"DynamicIsland/Preview Content\""; DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=macosx*]" = 3W9U482L92; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 9Y64TRM77N; ENABLE_APP_SANDBOX = NO; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; diff --git a/DynamicIsland/components/Tabs/TabSelectionView.swift b/DynamicIsland/components/Tabs/TabSelectionView.swift index ee8d75a..77eee5d 100644 --- a/DynamicIsland/components/Tabs/TabSelectionView.swift +++ b/DynamicIsland/components/Tabs/TabSelectionView.swift @@ -141,6 +141,7 @@ struct TabSelectionView: View { } } .animation(.smooth(duration: 0.3), value: coordinator.currentView) + .clipShape(Capsule()) .onAppear { ensureValidSelection(with: tabs) }