mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
home: normal-weight section headers flush with their content
This commit is contained in:
@@ -33,7 +33,6 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -257,7 +256,6 @@ private fun HomeSectionHeader(
|
||||
Text(
|
||||
text = title,
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
fontWeight = FontWeight.Bold,
|
||||
modifier = Modifier.weight(1f),
|
||||
)
|
||||
if (onMore != null) {
|
||||
@@ -272,7 +270,6 @@ private val TILE_SIZE = 132.dp
|
||||
private val ARTIST_TILE_SIZE = 104.dp
|
||||
private val TILE_SPACING = 8.dp
|
||||
private val ARTIST_SPACING = 16.dp
|
||||
private val SECTION_CONTENT_TOP = 4.dp
|
||||
private const val GENRE_ROWS = 3
|
||||
|
||||
private fun LazyListScope.albumRow(
|
||||
@@ -291,7 +288,6 @@ private fun LazyListScope.albumRow(
|
||||
LazyRow(
|
||||
contentPadding = PaddingValues(horizontal = 16.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(TILE_SPACING),
|
||||
modifier = Modifier.padding(top = SECTION_CONTENT_TOP),
|
||||
) {
|
||||
items(albums, key = { it.id }) { album ->
|
||||
val ref = coverArt(album.coverArt, true)
|
||||
@@ -322,7 +318,6 @@ private fun LazyListScope.artistRow(
|
||||
LazyRow(
|
||||
contentPadding = PaddingValues(horizontal = 16.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(ARTIST_SPACING),
|
||||
modifier = Modifier.padding(top = SECTION_CONTENT_TOP),
|
||||
) {
|
||||
items(artists, key = { it.id }) { artist ->
|
||||
val ref = coverArt(artist.coverArt, true)
|
||||
@@ -353,7 +348,7 @@ private fun LazyListScope.genreBlock(
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.horizontalScroll(rememberScrollState())
|
||||
.padding(start = 16.dp, end = 16.dp, top = SECTION_CONTENT_TOP),
|
||||
.padding(horizontal = 16.dp),
|
||||
) {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(TILE_SPACING)) {
|
||||
repeat(GENRE_ROWS) { row ->
|
||||
@@ -384,7 +379,6 @@ private fun LazyListScope.decadeRow(
|
||||
LazyRow(
|
||||
contentPadding = PaddingValues(horizontal = 16.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(TILE_SPACING),
|
||||
modifier = Modifier.padding(top = SECTION_CONTENT_TOP),
|
||||
) {
|
||||
items(decades, key = { it }) { decade ->
|
||||
AssistChip(onClick = { onDecadeClick(decade) }, label = { Text("${decade}s") })
|
||||
|
||||
Reference in New Issue
Block a user