fix(StatusSpellcheckingMenuItems): Exact menu items order

This commit is contained in:
B.Melnik 2021-09-22 17:15:33 +03:00 committed by Michał Cieślak
parent a30cd474d9
commit f0004ffc4c
1 changed files with 86 additions and 63 deletions

View File

@ -13,18 +13,40 @@ StatusPopupMenu {
signal addToUserDict()
signal disableSpellchecking()
Column {
Repeater {
id: suggestionsMenu
delegate: Loader {
sourceComponent: root.delegate
onLoaded: {
item.action.text = modelData
delegate: MenuItem {
id: variants
implicitWidth: parent ? parent.width : 0
implicitHeight: 38
contentItem: StatusBaseText {
rightPadding: 8
leftPadding: 4
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
text: modelData
color: Theme.palette.directColor1
font.pixelSize: 13
elide: Text.ElideRight
}
background: Rectangle {
color: variants.hovered ? Theme.palette.statusPopupMenu.hoverBackgroundColor
: "transparent"
}
onTriggered: {
root.menuItemClicked(index)
}
}
}
StatusMenuSeparator {}
StatusMenuSeparator { visible: !!suggestionsMenu.model && suggestionsMenu.model.length !== 0}
MenuItem {
id: ignoreWord
@ -80,5 +102,6 @@ StatusPopupMenu {
root.disableSpellchecking()
}
}
}
}