mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-23 19:26:50 +00:00
fix(tv): constrain media detail background gradients to image size
This commit is contained in:
@@ -89,44 +89,46 @@ internal fun TvMediaDetailBodyBox(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.heightIn(min = bodyHeight)
|
.heightIn(min = bodyHeight)
|
||||||
) {
|
) {
|
||||||
Box(modifier = Modifier.matchParentSize()) {
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxHeight()
|
||||||
|
.fillMaxWidth(MediaDetailBodyImageWidthFraction)
|
||||||
|
.align(Alignment.TopEnd)
|
||||||
|
) {
|
||||||
PurefinAsyncImage(
|
PurefinAsyncImage(
|
||||||
model = backgroundImageUrl,
|
model = backgroundImageUrl,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier
|
modifier = Modifier.fillMaxSize(),
|
||||||
.fillMaxHeight()
|
|
||||||
.fillMaxWidth(MediaDetailBodyImageWidthFraction)
|
|
||||||
.align(Alignment.TopEnd),
|
|
||||||
contentScale = ContentScale.Crop
|
contentScale = ContentScale.Crop
|
||||||
)
|
)
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.matchParentSize()
|
||||||
|
.background(
|
||||||
|
Brush.horizontalGradient(
|
||||||
|
colorStops = arrayOf(
|
||||||
|
0.0f to scheme.background,
|
||||||
|
0.28f to scheme.background.copy(alpha = 0.88f),
|
||||||
|
0.62f to scheme.background.copy(alpha = 0.42f),
|
||||||
|
1.0f to scheme.background.copy(alpha = 0.12f)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.matchParentSize()
|
||||||
|
.background(
|
||||||
|
Brush.verticalGradient(
|
||||||
|
colorStops = arrayOf(
|
||||||
|
0.0f to scheme.background.copy(alpha = 0.08f),
|
||||||
|
0.55f to scheme.background.copy(alpha = 0.16f),
|
||||||
|
1.0f to scheme.background
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
Box(
|
|
||||||
modifier = Modifier
|
|
||||||
.matchParentSize()
|
|
||||||
.background(
|
|
||||||
Brush.horizontalGradient(
|
|
||||||
colorStops = arrayOf(
|
|
||||||
0.0f to scheme.background,
|
|
||||||
0.28f to scheme.background.copy(alpha = 0.88f),
|
|
||||||
0.62f to scheme.background.copy(alpha = 0.42f),
|
|
||||||
1.0f to scheme.background.copy(alpha = 0.12f)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
Box(
|
|
||||||
modifier = Modifier
|
|
||||||
.matchParentSize()
|
|
||||||
.background(
|
|
||||||
Brush.verticalGradient(
|
|
||||||
colorStops = arrayOf(
|
|
||||||
0.0f to scheme.background.copy(alpha = 0.08f),
|
|
||||||
0.55f to scheme.background.copy(alpha = 0.16f),
|
|
||||||
1.0f to scheme.background
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
|||||||
Reference in New Issue
Block a user