Add minLines to comfortable grid item title (#9122)

This commit is contained in:
Ivan Iskandar 2023-02-21 23:44:56 +07:00 committed by GitHub
parent 60a3ba5a5c
commit bd7b21337c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,6 +144,7 @@ private fun BoxScope.CoverTextOverlay(
blurRadius = 4f,
),
),
minLines = 1,
)
if (onClickContinueReading != null) {
ContinueReadingButton(
@ -204,6 +205,7 @@ fun MangaComfortableGridItem(
modifier = Modifier.padding(4.dp),
title = title,
style = MaterialTheme.typography.titleSmall,
minLines = 2,
)
}
}
@ -252,12 +254,14 @@ private fun GridItemTitle(
modifier: Modifier,
title: String,
style: TextStyle,
minLines: Int,
) {
Text(
modifier = modifier,
text = title,
fontSize = 12.sp,
lineHeight = 18.sp,
minLines = minLines,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
style = style,