From 9859b38f327ae51c7f109de22a9a19e761055592 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 25 Sep 2022 10:18:47 -0400 Subject: [PATCH] Ellipsize long titles Fixes #8075 --- .../presentation/library/components/LibraryComfortableGrid.kt | 2 ++ .../presentation/library/components/LibraryCompactGrid.kt | 2 ++ .../eu/kanade/presentation/library/components/LibraryList.kt | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/src/main/java/eu/kanade/presentation/library/components/LibraryComfortableGrid.kt b/app/src/main/java/eu/kanade/presentation/library/components/LibraryComfortableGrid.kt index 65d15fcdf..68180f511 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/LibraryComfortableGrid.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/LibraryComfortableGrid.kt @@ -9,6 +9,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import eu.kanade.domain.manga.model.MangaCover @@ -94,6 +95,7 @@ fun MangaGridComfortableText( text = text, fontSize = 12.sp, maxLines = 2, + overflow = TextOverflow.Ellipsis, style = MaterialTheme.typography.titleSmall, ) } diff --git a/app/src/main/java/eu/kanade/presentation/library/components/LibraryCompactGrid.kt b/app/src/main/java/eu/kanade/presentation/library/components/LibraryCompactGrid.kt index 14e086113..9c94d320b 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/LibraryCompactGrid.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/LibraryCompactGrid.kt @@ -19,6 +19,7 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Shadow +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import eu.kanade.tachiyomi.data.database.models.LibraryManga @@ -114,6 +115,7 @@ fun BoxScope.MangaGridCompactText( color = Color.White, fontSize = 12.sp, maxLines = 2, + overflow = TextOverflow.Ellipsis, style = MaterialTheme.typography.titleSmall.copy( shadow = Shadow( color = Color.Black, diff --git a/app/src/main/java/eu/kanade/presentation/library/components/LibraryList.kt b/app/src/main/java/eu/kanade/presentation/library/components/LibraryList.kt index 4ddc9aaf4..79477be9c 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/LibraryList.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/LibraryList.kt @@ -14,6 +14,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex import eu.kanade.domain.manga.model.MangaCover @@ -179,6 +180,7 @@ fun RowScope.MangaListItemContent( .padding(horizontal = horizontalPadding) .weight(1f), maxLines = 2, + overflow = TextOverflow.Ellipsis, style = MaterialTheme.typography.bodyMedium, ) }