mirror of
https://github.com/amir1376/ab-download-manager.git
synced 2025-02-20 11:43:24 +08:00
Merge pull request #179 from amir1376/bug/remove-underlines-from-menubar
remove underlines from MenuBar
This commit is contained in:
commit
cedc85c03a
@ -78,20 +78,8 @@ fun MenuBar(
|
|||||||
.wrapContentHeight(Alignment.CenterVertically)
|
.wrapContentHeight(Alignment.CenterVertically)
|
||||||
) {
|
) {
|
||||||
val text = subMenu.title.collectAsState().value.rememberString()
|
val text = subMenu.title.collectAsState().value.rememberString()
|
||||||
val (firstChar, leadingText) = remember(text) {
|
|
||||||
when (text.length) {
|
|
||||||
0 -> "" to ""
|
|
||||||
1 -> text to ""
|
|
||||||
else -> text.first().toString() to text.substring(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Text(
|
Text(
|
||||||
buildAnnotatedString {
|
text = text,
|
||||||
withStyle(SpanStyle(textDecoration = TextDecoration.Underline)) {
|
|
||||||
append(firstChar)
|
|
||||||
}
|
|
||||||
append(leadingText)
|
|
||||||
},
|
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
fontSize = myTextSizes.base,
|
fontSize = myTextSizes.base,
|
||||||
color = myColors.onBackground,
|
color = myColors.onBackground,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user