Improve StreamThumbnail composable
This commit is contained in:
parent
2f9364a2cf
commit
75475da053
|
@ -41,8 +41,8 @@ fun StreamCardItem(
|
|||
.padding(top = 12.dp, start = 2.dp, end = 2.dp)
|
||||
) {
|
||||
StreamThumbnail(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
stream = stream,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
contentScale = ContentScale.FillWidth
|
||||
)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ fun StreamGridItem(
|
|||
) {
|
||||
val size = if (isMini) DpSize(150.dp, 85.dp) else DpSize(246.dp, 138.dp)
|
||||
|
||||
StreamThumbnail(modifier = Modifier.size(size), stream = stream)
|
||||
StreamThumbnail(stream = stream, modifier = Modifier.size(size))
|
||||
|
||||
Text(
|
||||
text = stream.name,
|
||||
|
|
|
@ -45,8 +45,8 @@ fun StreamListItem(
|
|||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
StreamThumbnail(
|
||||
modifier = Modifier.size(width = 98.dp, height = 55.dp),
|
||||
stream = stream
|
||||
stream = stream,
|
||||
modifier = Modifier.size(width = 98.dp, height = 55.dp)
|
||||
)
|
||||
|
||||
Column {
|
||||
|
|
|
@ -22,8 +22,8 @@ import org.schabi.newpipe.util.image.ImageStrategy
|
|||
|
||||
@Composable
|
||||
fun StreamThumbnail(
|
||||
modifier: Modifier = Modifier,
|
||||
stream: StreamInfoItem,
|
||||
modifier: Modifier = Modifier,
|
||||
contentScale: ContentScale = ContentScale.Fit
|
||||
) {
|
||||
Box(modifier = modifier, contentAlignment = Alignment.BottomEnd) {
|
||||
|
@ -49,6 +49,7 @@ fun StreamThumbnail(
|
|||
modifier = Modifier
|
||||
.padding(2.dp)
|
||||
.background(background.copy(alpha = 0.5f))
|
||||
.padding(2.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue