Truncate long nav bar/rail items
Fixes #8670 (cherry picked from commit 719d42795602b6da795f52e9871706c5931c6295)
This commit is contained in:
parent
29d9f1245d
commit
2fa43ba2c0
@ -30,6 +30,7 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.compose.ui.res.pluralStringResource
|
import androidx.compose.ui.res.pluralStringResource
|
||||||
import androidx.compose.ui.semantics.contentDescription
|
import androidx.compose.ui.semantics.contentDescription
|
||||||
import androidx.compose.ui.semantics.semantics
|
import androidx.compose.ui.semantics.semantics
|
||||||
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.util.fastForEach
|
import androidx.compose.ui.util.fastForEach
|
||||||
import cafe.adriel.voyager.core.screen.Screen
|
import cafe.adriel.voyager.core.screen.Screen
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
@ -196,6 +197,8 @@ object HomeScreen : Screen {
|
|||||||
Text(
|
Text(
|
||||||
text = tab.options.title,
|
text = tab.options.title,
|
||||||
style = MaterialTheme.typography.labelLarge,
|
style = MaterialTheme.typography.labelLarge,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
alwaysShowLabel = /* SY --> */alwaysShowLabel, /* SY <-- */
|
alwaysShowLabel = /* SY --> */alwaysShowLabel, /* SY <-- */
|
||||||
@ -222,6 +225,8 @@ object HomeScreen : Screen {
|
|||||||
Text(
|
Text(
|
||||||
text = tab.options.title,
|
text = tab.options.title,
|
||||||
style = MaterialTheme.typography.labelLarge,
|
style = MaterialTheme.typography.labelLarge,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
alwaysShowLabel = /* SY --> */alwaysShowLabel, /* SY <-- */
|
alwaysShowLabel = /* SY --> */alwaysShowLabel, /* SY <-- */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user