From 262ce3473fb35d31bb8fe9defe069a2111a17438 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 16 Jul 2023 22:24:14 -0400 Subject: [PATCH] Increase max lines for title in global search to 3 Closes #9729 --- .../presentation/browse/components/GlobalSearchCardRow.kt | 1 + .../presentation/library/components/CommonMangaItem.kt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchCardRow.kt b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchCardRow.kt index f10f834f4..61d5b722f 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchCardRow.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchCardRow.kt @@ -63,6 +63,7 @@ private fun MangaItem( Box(modifier = Modifier.width(96.dp)) { MangaComfortableGridItem( title = title, + titleMaxLines = 3, coverData = cover, coverBadgeStart = { InLibraryBadge(enabled = isFavorite) diff --git a/app/src/main/java/eu/kanade/presentation/library/components/CommonMangaItem.kt b/app/src/main/java/eu/kanade/presentation/library/components/CommonMangaItem.kt index e59ef4190..5f83c764f 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/CommonMangaItem.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/CommonMangaItem.kt @@ -163,6 +163,7 @@ private fun BoxScope.CoverTextOverlay( fun MangaComfortableGridItem( isSelected: Boolean = false, title: String, + titleMaxLines: Int = 2, coverData: tachiyomi.domain.manga.model.MangaCover, coverAlpha: Float = 1f, coverBadgeStart: (@Composable RowScope.() -> Unit)? = null, @@ -204,6 +205,7 @@ fun MangaComfortableGridItem( title = title, style = MaterialTheme.typography.titleSmall, minLines = 2, + maxLines = titleMaxLines, ) } } @@ -253,6 +255,7 @@ private fun GridItemTitle( title: String, style: TextStyle, minLines: Int, + maxLines: Int = 2, ) { Text( modifier = modifier, @@ -260,7 +263,7 @@ private fun GridItemTitle( fontSize = 12.sp, lineHeight = 18.sp, minLines = minLines, - maxLines = 2, + maxLines = maxLines, overflow = TextOverflow.Ellipsis, style = style, )