Add vertical padding to items in lists
This commit is contained in:
parent
f86970e09a
commit
73cc0554c2
3 changed files with 8 additions and 6 deletions
|
@ -343,7 +343,7 @@ fun SmallItem(
|
|||
interactionSource = remember { MutableInteractionSource() },
|
||||
onClick = onClick
|
||||
)
|
||||
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||
.padding(vertical = Dimensions.itemsVerticalPadding, horizontal = 16.dp)
|
||||
)
|
||||
is YouTube.Item.Song -> SmallSongItem(
|
||||
song = item,
|
||||
|
@ -361,7 +361,7 @@ fun SmallItem(
|
|||
interactionSource = remember { MutableInteractionSource() },
|
||||
onClick = onClick
|
||||
)
|
||||
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||
.padding(vertical = Dimensions.itemsVerticalPadding, horizontal = 16.dp)
|
||||
)
|
||||
is YouTube.Item.Video -> SmallVideoItem(
|
||||
video = item,
|
||||
|
@ -379,7 +379,7 @@ fun SmallItem(
|
|||
interactionSource = remember { MutableInteractionSource() },
|
||||
onClick = onClick
|
||||
)
|
||||
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||
.padding(vertical = Dimensions.itemsVerticalPadding, horizontal = 16.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -584,7 +584,7 @@ private fun LoadingOrError(
|
|||
modifier = Modifier
|
||||
.alpha(1f - index * 0.125f)
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||
.padding(vertical = Dimensions.itemsVerticalPadding, horizontal = 16.dp)
|
||||
)
|
||||
} else {
|
||||
SmallSongItemShimmer(
|
||||
|
@ -592,7 +592,7 @@ private fun LoadingOrError(
|
|||
modifier = Modifier
|
||||
.alpha(1f - index * 0.125f)
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 5.dp, horizontal = 16.dp)
|
||||
.padding(vertical = Dimensions.itemsVerticalPadding, horizontal = 16.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ import androidx.compose.ui.unit.dp
|
|||
|
||||
@Suppress("ClassName")
|
||||
object Dimensions {
|
||||
val itemsVerticalPadding = 8.dp
|
||||
|
||||
object thumbnails {
|
||||
val album = 128.dp
|
||||
val artist = 192.dp
|
||||
|
|
|
@ -170,7 +170,7 @@ fun SongItem(
|
|||
onClick = onClick
|
||||
)
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 5.dp)
|
||||
.padding(vertical = Dimensions.itemsVerticalPadding)
|
||||
.background(backgroundColor ?: colorPalette.background)
|
||||
.padding(start = 16.dp, end = if (trailingContent == null) 16.dp else 8.dp)
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue