small parallax effect on album artwork

This commit is contained in:
delli 2025-12-14 19:47:14 +01:00
commit 9d708069d8
5 changed files with 75 additions and 0 deletions

View file

@ -882,6 +882,7 @@ struct MinimalisticAlbumArtView: View {
.clipShape(RoundedRectangle(cornerRadius: 12))
.matchedGeometryEffect(id: "albumArt", in: albumArtNamespace)
.albumArtFlip(angle: musicManager.flipAngle)
.parallax3D(magnitude: 12)
}
.buttonStyle(PlainButtonStyle())
.opacity(musicManager.isPlaying ? 1 : 0.4)

View file

@ -69,6 +69,7 @@ struct AlbumArtView: View {
appIconOverlay
}
.albumArtFlip(angle: musicManager.flipAngle)
.parallax3D(magnitude: 12)
}
.buttonStyle(PlainButtonStyle())
.scaleEffect(musicManager.isPlaying ? 1 : 0.85)

View file

@ -1453,6 +1453,8 @@ struct Media: View {
.disabled(!enableSneakPeek)
Defaults.Toggle("Enable lyrics", key: .enableLyrics)
.settingsHighlight(id: highlightID("Enable lyrics"))
Defaults.Toggle("Enable album art parallax effect", key: .enableParallaxEffect)
.settingsHighlight(id: highlightID("Enable album art parallax effect"))
Picker("Sneak Peek Style", selection: $sneakPeekStyles){
ForEach(SneakPeekStyle.allCases) { style in
Text(style.rawValue).tag(style)