Change the text color when appmenu is selected or hovered

When the mouse hovers the appmenu item, the text color should be inverted to the background
color. Before this commit, the text was still the same color as the "REST" state, making it
difficult to recognize.
wilder-5.25
Xu Zhao 4 years ago committed by Nicolás Alvarez
parent 2f62e06634
commit 28537cf3ff
  1. 4
      applets/appmenu/package/contents/ui/MenuDelegate.qml

@ -66,5 +66,9 @@ AbstractButton {
contentItem: PC3.Label {
text: controlRoot.Kirigami.MnemonicData.richTextLabel
// Kirigami.Theme.highlightedTextColor returns different colors
// depending on window focus, which does not apply to this applet
// instead, we use palette.highlightedText here, which returns consistent result
color: background.state == MenuDelegate.State.Rest ? palette.windowText : palette.highlightedText
}
}

Loading…
Cancel
Save