Set maxlines to 1 for manga chips
This commit is contained in:
parent
6e50e9a38a
commit
2a587ac90c
@ -17,6 +17,7 @@ import androidx.compose.runtime.remember
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.platform.LocalDensity
|
import androidx.compose.ui.platform.LocalDensity
|
||||||
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.google.accompanist.flowlayout.FlowRow
|
import com.google.accompanist.flowlayout.FlowRow
|
||||||
@ -141,7 +142,14 @@ fun TagsChip(
|
|||||||
SuggestionChip(
|
SuggestionChip(
|
||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
onLongClick = onLongClick,
|
onLongClick = onLongClick,
|
||||||
label = { Text(text = text, style = MaterialTheme.typography.bodySmall) },
|
label = {
|
||||||
|
Text(
|
||||||
|
text = text,
|
||||||
|
style = MaterialTheme.typography.bodySmall,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
)
|
||||||
|
},
|
||||||
border = border,
|
border = border,
|
||||||
colors = SuggestionChipDefaults.suggestionChipColors(
|
colors = SuggestionChipDefaults.suggestionChipColors(
|
||||||
containerColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f),
|
containerColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f),
|
||||||
@ -151,7 +159,14 @@ fun TagsChip(
|
|||||||
} else {
|
} else {
|
||||||
SuggestionChip(
|
SuggestionChip(
|
||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
label = { Text(text = text, style = MaterialTheme.typography.bodySmall) },
|
label = {
|
||||||
|
Text(
|
||||||
|
text = text,
|
||||||
|
style = MaterialTheme.typography.bodySmall,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
)
|
||||||
|
},
|
||||||
border = borderM3,
|
border = borderM3,
|
||||||
colors = SuggestionChipDefaultsM3.suggestionChipColors(
|
colors = SuggestionChipDefaultsM3.suggestionChipColors(
|
||||||
containerColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f),
|
containerColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f),
|
||||||
@ -161,7 +176,14 @@ fun TagsChip(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SuggestionChip(
|
SuggestionChip(
|
||||||
label = { Text(text = text, style = MaterialTheme.typography.bodySmall) },
|
label = {
|
||||||
|
Text(
|
||||||
|
text = text,
|
||||||
|
style = MaterialTheme.typography.bodySmall,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
)
|
||||||
|
},
|
||||||
border = border,
|
border = border,
|
||||||
colors = SuggestionChipDefaults.suggestionChipColors(
|
colors = SuggestionChipDefaults.suggestionChipColors(
|
||||||
containerColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f),
|
containerColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user