Fix badge count getting cut off on tab title

Fixes #335
This commit is contained in:
AntsyLich 2024-05-05 01:15:07 +06:00
parent 7ec2108812
commit 263e467cde
No known key found for this signature in database

View file

@ -6,6 +6,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import tachiyomi.presentation.core.components.Pill import tachiyomi.presentation.core.components.Pill
@ -21,6 +22,7 @@ fun TabText(text: String, badgeCount: Int? = null) {
text = text, text = text,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f, fill = false),
) )
if (badgeCount != null) { if (badgeCount != null) {
Pill( Pill(