From e37baaeb7489be6c3a6377921138631cd5a25c43 Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Thu, 13 Jan 2022 21:48:21 +0300 Subject: [PATCH] [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. --- applets/appmenu/package/contents/ui/MenuDelegate.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/applets/appmenu/package/contents/ui/MenuDelegate.qml b/applets/appmenu/package/contents/ui/MenuDelegate.qml index e6859fa17..a6a5ab6f4 100644 --- a/applets/appmenu/package/contents/ui/MenuDelegate.qml +++ b/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 } }