make chapter select items look better

This commit is contained in:
Christian Schabesberger 2024-09-06 14:18:47 +02:00
parent 09f32dd893
commit 0d8662fb5b
3 changed files with 10 additions and 4 deletions

View File

@ -106,25 +106,28 @@ fun ChapterItem(
Row {
val contentDescription = stringResource(R.string.chapter_thumbnail)
Thumbnail(
modifier = Modifier.fillMaxHeight(),
thumbnail = thumbnail,
contentDescription = contentDescription,
shape = ITEM_CORNER_SHAPE
)
Column(
modifier = Modifier
.padding(start = 8.dp, top = 5.dp, bottom = 5.dp)
.padding(6.dp)
.weight(1f),
horizontalAlignment = Alignment.Start,
) {
Text(
text = chapterTitle,
fontSize = 18.sp,
fontSize = 14.sp,
fontWeight = FontWeight.Bold,
maxLines = 1,
maxLines = 2,
overflow = TextOverflow.Ellipsis
)
Text(
getTimeStringFromMs(chapterStartInMs, locale),
fontSize = 13.sp,
fontWeight = FontWeight.Light,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)

View File

@ -32,6 +32,7 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
@ -133,6 +134,7 @@ fun StreamItem(
) {
val contentDescription = stringResource(R.string.stream_item_thumbnail)
Thumbnail(
modifier = Modifier.fillMaxHeight(),
thumbnail = playlistItem.thumbnail,
contentDescription = contentDescription,
shape = ITEM_CORNER_SHAPE

View File

@ -39,6 +39,7 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
@ -166,7 +167,7 @@ fun Thumbnail(
is OnlineThumbnail -> AsyncImage(
modifier = modifier,
model = thumbnail.url,
contentDescription = contentDescription
contentDescription = contentDescription,
)
is BitmapThumbnail -> Image(