Update music album art ratio

This commit is contained in:
Hariharan Mudaliar 2026-03-13 19:48:06 +05:30
commit 2857ad02a6
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
4 changed files with 17 additions and 9 deletions

View file

@ -970,7 +970,7 @@ struct ContentView: View {
.background( .background(
Image(nsImage: musicManager.albumArt) Image(nsImage: musicManager.albumArt)
.resizable() .resizable()
.aspectRatio(contentMode: .fill) .aspectRatio(contentMode: .fit)
) )
.clipped() .clipped()
.clipShape(RoundedRectangle(cornerRadius: MusicPlayerImageSizes.cornerRadiusInset.closed)) .clipShape(RoundedRectangle(cornerRadius: MusicPlayerImageSizes.cornerRadiusInset.closed))

View file

@ -92,7 +92,7 @@ struct MinimalisticMusicView: View {
.background( .background(
Image(nsImage: musicManager.albumArt) Image(nsImage: musicManager.albumArt)
.resizable() .resizable()
.aspectRatio(contentMode: .fill) .aspectRatio(contentMode: .fit)
) )
.clipped() .clipped()
.clipShape(RoundedRectangle(cornerRadius: 18)) // Dramatically increased corner radius for minimalistic mode .clipShape(RoundedRectangle(cornerRadius: 18)) // Dramatically increased corner radius for minimalistic mode

View file

@ -1058,7 +1058,7 @@ struct MinimalisticAlbumArtView: View {
.background( .background(
Image(nsImage: musicManager.albumArt) Image(nsImage: musicManager.albumArt)
.resizable() .resizable()
.aspectRatio(contentMode: .fill) .aspectRatio(contentMode: .fit)
) )
.clipped() .clipped()
.clipShape(RoundedRectangle(cornerRadius: 12)) .clipShape(RoundedRectangle(cornerRadius: 12))
@ -1077,7 +1077,7 @@ struct MinimalisticAlbumArtView: View {
.background( .background(
Image(nsImage: musicManager.albumArt) Image(nsImage: musicManager.albumArt)
.resizable() .resizable()
.aspectRatio(contentMode: .fill) .aspectRatio(contentMode: .fit)
) )
.clipped() .clipped()
.clipShape(RoundedRectangle(cornerRadius: 12)) .clipShape(RoundedRectangle(cornerRadius: 12))

View file

@ -56,8 +56,13 @@ struct AlbumArtView: View {
} }
private var albumArtBackground: some View { private var albumArtBackground: some View {
Image(nsImage: musicManager.albumArt) Color.clear
.resizable() .aspectRatio(1, contentMode: .fit)
.background(
Image(nsImage: musicManager.albumArt)
.resizable()
.aspectRatio(contentMode: .fit)
)
.clipped() .clipped()
.clipShape( .clipShape(
RoundedRectangle( RoundedRectangle(
@ -65,7 +70,6 @@ struct AlbumArtView: View {
? MusicPlayerImageSizes.cornerRadiusInset.opened ? MusicPlayerImageSizes.cornerRadiusInset.opened
: MusicPlayerImageSizes.cornerRadiusInset.closed) : MusicPlayerImageSizes.cornerRadiusInset.closed)
) )
.aspectRatio(1, contentMode: .fit)
.scaleEffect(x: 1.3, y: 1.4) .scaleEffect(x: 1.3, y: 1.4)
.rotationEffect(.degrees(92)) .rotationEffect(.degrees(92))
.blur(radius: 40) .blur(radius: 40)
@ -100,9 +104,13 @@ struct AlbumArtView: View {
} }
private var albumArtImage: some View { private var albumArtImage: some View {
Image(nsImage: musicManager.albumArt) Color.clear
.resizable()
.aspectRatio(1, contentMode: .fit) .aspectRatio(1, contentMode: .fit)
.overlay {
Image(nsImage: musicManager.albumArt)
.resizable()
.aspectRatio(contentMode: .fit)
}
.matchedGeometryEffect(id: "albumArt", in: albumArtNamespace) .matchedGeometryEffect(id: "albumArt", in: albumArtNamespace)
.clipped() .clipped()
.clipShape( .clipShape(