mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
parent
43b9b104f5
commit
262ce3473f
2 changed files with 5 additions and 1 deletions
|
@ -63,6 +63,7 @@ private fun MangaItem(
|
||||||
Box(modifier = Modifier.width(96.dp)) {
|
Box(modifier = Modifier.width(96.dp)) {
|
||||||
MangaComfortableGridItem(
|
MangaComfortableGridItem(
|
||||||
title = title,
|
title = title,
|
||||||
|
titleMaxLines = 3,
|
||||||
coverData = cover,
|
coverData = cover,
|
||||||
coverBadgeStart = {
|
coverBadgeStart = {
|
||||||
InLibraryBadge(enabled = isFavorite)
|
InLibraryBadge(enabled = isFavorite)
|
||||||
|
|
|
@ -163,6 +163,7 @@ private fun BoxScope.CoverTextOverlay(
|
||||||
fun MangaComfortableGridItem(
|
fun MangaComfortableGridItem(
|
||||||
isSelected: Boolean = false,
|
isSelected: Boolean = false,
|
||||||
title: String,
|
title: String,
|
||||||
|
titleMaxLines: Int = 2,
|
||||||
coverData: tachiyomi.domain.manga.model.MangaCover,
|
coverData: tachiyomi.domain.manga.model.MangaCover,
|
||||||
coverAlpha: Float = 1f,
|
coverAlpha: Float = 1f,
|
||||||
coverBadgeStart: (@Composable RowScope.() -> Unit)? = null,
|
coverBadgeStart: (@Composable RowScope.() -> Unit)? = null,
|
||||||
|
@ -204,6 +205,7 @@ fun MangaComfortableGridItem(
|
||||||
title = title,
|
title = title,
|
||||||
style = MaterialTheme.typography.titleSmall,
|
style = MaterialTheme.typography.titleSmall,
|
||||||
minLines = 2,
|
minLines = 2,
|
||||||
|
maxLines = titleMaxLines,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -253,6 +255,7 @@ private fun GridItemTitle(
|
||||||
title: String,
|
title: String,
|
||||||
style: TextStyle,
|
style: TextStyle,
|
||||||
minLines: Int,
|
minLines: Int,
|
||||||
|
maxLines: Int = 2,
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
|
@ -260,7 +263,7 @@ private fun GridItemTitle(
|
||||||
fontSize = 12.sp,
|
fontSize = 12.sp,
|
||||||
lineHeight = 18.sp,
|
lineHeight = 18.sp,
|
||||||
minLines = minLines,
|
minLines = minLines,
|
||||||
maxLines = 2,
|
maxLines = maxLines,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
style = style,
|
style = style,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue