[applets/appmenu] Set MenuDelegate's textFormat explicitly to StyledText

Generally, this property should be set on every Text component that we
write. It avoids ambiguity and extra potentially expensive parsing step
with heuristics. Here, we know for sure that the label is in rich text
format.

Text.StyledText format is computationally cheaper than the Text.RichText,
while still getting its job done: displaying the underlined letters when
Alt is key pressed.
wilder-5.26
ivan tkachenko 4 years ago committed by Nate Graham
parent 6f92469314
commit e37baaeb74
  1. 1
      applets/appmenu/package/contents/ui/MenuDelegate.qml

@ -68,6 +68,7 @@ AbstractButton {
contentItem: PC3.Label {
text: controlRoot.Kirigami.MnemonicData.richTextLabel
textFormat: PC3.Label.StyledText
color: background.state == MenuDelegate.State.Rest ? PlasmaCore.Theme.textColor : PlasmaCore.Theme.highlightedTextColor
}
}

Loading…
Cancel
Save