mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 07:29:14 +01:00
trim the library header, enlarge artist art, fix album title color
This commit is contained in:
@@ -42,7 +42,7 @@ import com.subtracks.ui.components.CoverArt
|
||||
import org.koin.compose.viewmodel.koinViewModel
|
||||
import org.koin.core.parameter.parametersOf
|
||||
|
||||
private val ART_HEIGHT = 320.dp
|
||||
private val ART_HEIGHT = 420.dp
|
||||
private val SCRIM_HEIGHT = 128.dp
|
||||
|
||||
@Composable
|
||||
@@ -102,14 +102,6 @@ fun ArtistDetailScreen(
|
||||
)
|
||||
}
|
||||
}
|
||||
item(span = { GridItemSpan(maxLineSpan) }) {
|
||||
Text(
|
||||
text = "${albums.size} albums",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.padding(start = 16.dp, end = 16.dp, bottom = 4.dp),
|
||||
)
|
||||
}
|
||||
itemsIndexed(albums, key = { _, album -> album.id }) { index, album ->
|
||||
Column(
|
||||
modifier =
|
||||
@@ -127,6 +119,7 @@ fun ArtistDetailScreen(
|
||||
Text(
|
||||
text = album.name,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = MaterialTheme.colorScheme.onBackground,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = Modifier.padding(top = 6.dp),
|
||||
|
||||
@@ -155,13 +155,13 @@ fun LibraryScreen(
|
||||
}
|
||||
|
||||
val density = LocalDensity.current
|
||||
val titleHeight = TopAppBarDefaults.TopAppBarExpandedHeight
|
||||
val titleLineHeight =
|
||||
with(density) {
|
||||
MaterialTheme.typography.headlineLarge.lineHeight
|
||||
.toDp()
|
||||
}
|
||||
val titleTop = ((titleHeight - titleLineHeight) / 2).coerceAtLeast(0.dp)
|
||||
val titleTop = ((TopAppBarDefaults.TopAppBarExpandedHeight - titleLineHeight) / 2).coerceAtLeast(0.dp)
|
||||
val titleHeight = titleTop + titleLineHeight + 4.dp
|
||||
val scrollBehavior = TopAppBarDefaults.enterAlwaysScrollBehavior()
|
||||
SideEffect { scrollBehavior.state.heightOffsetLimit = -with(density) { titleHeight.toPx() } }
|
||||
val titleFraction = scrollBehavior.state.collapsedFraction
|
||||
|
||||
Reference in New Issue
Block a user