ui changes

This commit is contained in:
tapframe 2026-03-11 21:30:12 +05:30
parent 474593dbf7
commit bafae15f7e

View file

@ -30,37 +30,40 @@ fun DetailHero(
modifier: Modifier = Modifier,
) {
Box(
modifier = modifier.fillMaxWidth(),
modifier = modifier
.fillMaxWidth()
.aspectRatio(0.75f)
.graphicsLayer {
clip = true
},
) {
val imageUrl = meta.background ?: meta.poster
if (imageUrl != null) {
AsyncImage(
model = imageUrl,
contentDescription = meta.name,
modifier = Modifier
.fillMaxWidth()
.aspectRatio(0.75f)
.graphicsLayer {
translationY = scrollOffset * 0.5f
},
contentScale = ContentScale.Crop,
)
} else {
Box(
modifier = Modifier
.fillMaxWidth()
.aspectRatio(0.75f)
.background(MaterialTheme.colorScheme.surface),
)
}
// Gradient overlay at the bottom
Box(
modifier = Modifier
.fillMaxWidth()
.aspectRatio(0.75f),
.fillMaxSize(),
contentAlignment = Alignment.BottomCenter,
) {
val imageUrl = meta.background ?: meta.poster
if (imageUrl != null) {
AsyncImage(
model = imageUrl,
contentDescription = meta.name,
modifier = Modifier
.fillMaxSize()
.graphicsLayer {
translationY = scrollOffset * 0.5f
scaleX = 1.08f
scaleY = 1.08f
},
contentScale = ContentScale.Crop,
)
} else {
Box(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colorScheme.surface),
)
}
Box(
modifier = Modifier
.fillMaxWidth()