Fix album artwork sizing
This commit is contained in:
1 parent
4db0f2f8ff
commit
ec734926e9
1 file changed
+4
-1
@@ -5,6 +5,7 @@ struct AlbumArtworkView: View {
|
||||
var cornerRadius: CGFloat = 12
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
AsyncImage(url: url) { phase in
|
||||
switch phase {
|
||||
case .success(let image):
|
||||
@@ -20,7 +21,9 @@ struct AlbumArtworkView: View {
|
||||
artworkPlaceholder
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(width: geometry.size.width, height: geometry.size.height)
|
||||
.clipped()
|
||||
}
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
.clipShape(RoundedRectangle(cornerRadius: cornerRadius, style: .continuous))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user