Fix UI disparities
This commit is contained in:
parent
749e995d42
commit
bde063995a
|
@ -197,7 +197,7 @@ fun SearchResultScreen(
|
||||||
unselectedTextStyle = typography.xs.medium,
|
unselectedTextStyle = typography.xs.medium,
|
||||||
shape = RoundedCornerShape(36.dp),
|
shape = RoundedCornerShape(36.dp),
|
||||||
onValueChanged = {
|
onValueChanged = {
|
||||||
preferences.searchFilter = it
|
preferences.searchFilter = it
|
||||||
},
|
},
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = 8.dp)
|
.padding(vertical = 8.dp)
|
||||||
|
@ -276,7 +276,7 @@ fun SmallSongItemShimmer(
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
) {
|
) {
|
||||||
Spacer(
|
Spacer(
|
||||||
|
@ -301,7 +301,7 @@ fun SmallArtistItemShimmer(
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
) {
|
) {
|
||||||
Spacer(
|
Spacer(
|
||||||
|
@ -334,7 +334,7 @@ fun SmallItem(
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
onClick = onClick
|
onClick = onClick
|
||||||
)
|
)
|
||||||
.padding(vertical = 4.dp, horizontal = 16.dp)
|
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||||
)
|
)
|
||||||
is YouTube.Item.Song -> SmallSongItem(
|
is YouTube.Item.Song -> SmallSongItem(
|
||||||
song = item,
|
song = item,
|
||||||
|
@ -352,7 +352,7 @@ fun SmallItem(
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
onClick = onClick
|
onClick = onClick
|
||||||
)
|
)
|
||||||
.padding(vertical = 4.dp, horizontal = 16.dp)
|
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||||
)
|
)
|
||||||
is YouTube.Item.Video -> SmallVideoItem(
|
is YouTube.Item.Video -> SmallVideoItem(
|
||||||
video = item,
|
video = item,
|
||||||
|
@ -370,7 +370,7 @@ fun SmallItem(
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
onClick = onClick
|
onClick = onClick
|
||||||
)
|
)
|
||||||
.padding(vertical = 4.dp, horizontal = 16.dp)
|
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,8 @@ fun SmallVideoItem(
|
||||||
SongItem(
|
SongItem(
|
||||||
thumbnailModel = video.thumbnail?.size(thumbnailSizePx),
|
thumbnailModel = video.thumbnail?.size(thumbnailSizePx),
|
||||||
title = video.info.name,
|
title = video.info.name,
|
||||||
authors = video.views.joinToString("") { it.name },
|
authors = (if (video.isOfficialMusicVideo) video.authors else video.views)
|
||||||
|
.joinToString("") { it.name },
|
||||||
durationText = video.durationText,
|
durationText = video.durationText,
|
||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
menuContent = {
|
menuContent = {
|
||||||
|
@ -452,14 +453,17 @@ fun SmallPlaylistItem(
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
BasicText(
|
BasicText(
|
||||||
text = buildString {
|
text = playlist.channel?.name ?: "",
|
||||||
append(playlist.channel?.name)
|
style = typography.xs.semiBold.secondary,
|
||||||
if (playlist.channel?.name?.isEmpty() == false && playlist.songCount != null) {
|
maxLines = 1,
|
||||||
append(" • ")
|
overflow = TextOverflow.Ellipsis,
|
||||||
}
|
)
|
||||||
append("${playlist.songCount} songs")
|
}
|
||||||
},
|
|
||||||
style = typography.xs,
|
playlist.songCount?.let { songCount ->
|
||||||
|
BasicText(
|
||||||
|
text = "$songCount songs",
|
||||||
|
style = typography.xxs.secondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
@ -501,8 +505,17 @@ fun SmallAlbumItem(
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
BasicText(
|
BasicText(
|
||||||
text = "${album.authors?.joinToString("") { it.name }} • ${album.year}",
|
text = album.authors?.joinToString("") { it.name } ?: "",
|
||||||
style = typography.xs,
|
style = typography.xs.semiBold.secondary,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
album.year?.let { year ->
|
||||||
|
BasicText(
|
||||||
|
text = year,
|
||||||
|
style = typography.xxs.secondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
@ -562,7 +575,7 @@ private fun LoadingOrError(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.alpha(1f - index * 0.125f)
|
.alpha(1f - index * 0.125f)
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 4.dp, horizontal = 16.dp)
|
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
SmallSongItemShimmer(
|
SmallSongItemShimmer(
|
||||||
|
@ -570,7 +583,7 @@ private fun LoadingOrError(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.alpha(1f - index * 0.125f)
|
.alpha(1f - index * 0.125f)
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 4.dp, horizontal = 16.dp)
|
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ fun PlayerView(
|
||||||
)
|
)
|
||||||
BasicText(
|
BasicText(
|
||||||
text = playerState.mediaMetadata.artist?.toString() ?: "",
|
text = playerState.mediaMetadata.artist?.toString() ?: "",
|
||||||
style = typography.xs,
|
style = typography.xs.semiBold.secondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue