Limit file titles to one line in toolbar

This commit is contained in:
William Brawner 2024-01-29 21:12:41 -07:00
parent a35aa62399
commit 6acacf5edb

View file

@ -64,6 +64,7 @@ import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.input.KeyboardCapitalization import androidx.compose.ui.text.input.KeyboardCapitalization
import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.core.content.ContextCompat.startActivity import androidx.core.content.ContextCompat.startActivity
import androidx.navigation.NavController import androidx.navigation.NavController
@ -364,7 +365,7 @@ fun MarkdownTopAppBar(
) { ) {
val coroutineScope = rememberCoroutineScope() val coroutineScope = rememberCoroutineScope()
TopAppBar(title = { TopAppBar(title = {
Text(title) Text(text = title, maxLines = 1, overflow = TextOverflow.Ellipsis)
}, navigationIcon = { }, navigationIcon = {
val (icon, contentDescription, onClick) = remember { val (icon, contentDescription, onClick) = remember {
if (backAsUp) { if (backAsUp) {