Use ContentScale.Crop instead ContentScale.FillBounds to avoid ugly thumbnail stretches
This commit is contained in:
parent
bf74be01db
commit
867642e0c4
5 changed files with 8 additions and 8 deletions
|
@ -232,7 +232,7 @@ fun PlaylistOrAlbumScreen(
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = playlistOrAlbum.thumbnail?.size(thumbnailSizePx),
|
model = playlistOrAlbum.thumbnail?.size(thumbnailSizePx),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
contentScale = ContentScale.FillBounds,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clip(ThumbnailRoundness.shape)
|
.clip(ThumbnailRoundness.shape)
|
||||||
.size(thumbnailSizeDp)
|
.size(thumbnailSizeDp)
|
||||||
|
@ -348,7 +348,7 @@ fun PlaylistOrAlbumScreen(
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = song.thumbnail!!.size(songThumbnailSizePx),
|
model = song.thumbnail!!.size(songThumbnailSizePx),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
contentScale = ContentScale.FillBounds,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clip(ThumbnailRoundness.shape)
|
.clip(ThumbnailRoundness.shape)
|
||||||
.size(songThumbnailSizeDp)
|
.size(songThumbnailSizeDp)
|
||||||
|
|
|
@ -461,7 +461,7 @@ fun SmallPlaylistItem(
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = playlist.thumbnail.size(thumbnailSizePx),
|
model = playlist.thumbnail.size(thumbnailSizePx),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
contentScale = ContentScale.FillBounds,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clip(ThumbnailRoundness.shape)
|
.clip(ThumbnailRoundness.shape)
|
||||||
.size(thumbnailSizeDp)
|
.size(thumbnailSizeDp)
|
||||||
|
@ -510,7 +510,7 @@ fun SmallAlbumItem(
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = album.thumbnail.size(thumbnailSizePx),
|
model = album.thumbnail.size(thumbnailSizePx),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
contentScale = ContentScale.FillBounds,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clip(ThumbnailRoundness.shape)
|
.clip(ThumbnailRoundness.shape)
|
||||||
.size(thumbnailSizeDp)
|
.size(thumbnailSizeDp)
|
||||||
|
|
|
@ -115,7 +115,7 @@ fun PlayerView(
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = "${player.mediaMetadata.artworkUri}-w$smallThumbnailSize-h$smallThumbnailSize",
|
model = "${player.mediaMetadata.artworkUri}-w$smallThumbnailSize-h$smallThumbnailSize",
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
contentScale = ContentScale.FillBounds,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clip(ThumbnailRoundness.shape)
|
.clip(ThumbnailRoundness.shape)
|
||||||
.size(64.dp)
|
.size(64.dp)
|
||||||
|
@ -234,7 +234,7 @@ fun PlayerView(
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = "$artworkUri-w$thumbnailSizePx-h$thumbnailSizePx",
|
model = "$artworkUri-w$thumbnailSizePx-h$thumbnailSizePx",
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
contentScale = ContentScale.FillBounds,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(bottom = 32.dp)
|
.padding(bottom = 32.dp)
|
||||||
.padding(horizontal = 32.dp)
|
.padding(horizontal = 32.dp)
|
||||||
|
|
|
@ -70,7 +70,7 @@ fun PlaylistPreviewItem(
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = "${thumbnails.getOrNull(index)}-w$thumbnailSizePx-h$thumbnailSizePx",
|
model = "${thumbnails.getOrNull(index)}-w$thumbnailSizePx-h$thumbnailSizePx",
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
contentScale = ContentScale.FillBounds,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(alignment)
|
.align(alignment)
|
||||||
.size(thumbnailSize)
|
.size(thumbnailSize)
|
||||||
|
|
|
@ -115,7 +115,7 @@ fun SongItem(
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = thumbnailModel,
|
model = thumbnailModel,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
contentScale = ContentScale.FillBounds,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clip(ThumbnailRoundness.shape)
|
.clip(ThumbnailRoundness.shape)
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
|
|
Loading…
Reference in a new issue