Fixed 1 color picker bug made home UI padding

This commit is contained in:
Venkatesh 2026-03-31 20:35:47 +08:00
commit 90b5dae3ba
12 changed files with 58 additions and 122 deletions

View file

@ -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 {

View file

@ -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)

View file

@ -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]
}
}

View file

@ -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)

View file

@ -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:

View file

@ -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)

View file

@ -31,7 +31,6 @@ struct TabButton: View {
var body: some View {
Button(action: onClick) {
Image(systemName: icon)
.padding(.horizontal, 15)
.contentShape(Capsule())
}
.buttonStyle(PlainButtonStyle())

View file

@ -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)
}