feat(StatusChatListItem): accept right clicks
Also triggers the context menu in `StatusChatListCategory`. Fixes #131
This commit is contained in:
parent
22eaf6fa99
commit
1f3aa0bbd5
|
@ -30,7 +30,14 @@ Column {
|
||||||
title: statusChatListCategory.name
|
title: statusChatListCategory.name
|
||||||
opened: statusChatListCategory.opened
|
opened: statusChatListCategory.opened
|
||||||
|
|
||||||
onClicked: statusChatListCategory.opened = !opened
|
onClicked: {
|
||||||
|
if (mouse.button === Qt.RightButton) {
|
||||||
|
highlighted = true
|
||||||
|
popupMenuSlot.item.popup(mouse.x + 4, mouse.y + 6)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
statusChatListCategory.opened = !opened
|
||||||
|
}
|
||||||
onToggleButtonClicked: statusChatListCategory.opened = !opened
|
onToggleButtonClicked: statusChatListCategory.opened = !opened
|
||||||
onMenuButtonClicked: {
|
onMenuButtonClicked: {
|
||||||
highlighted = true
|
highlighted = true
|
||||||
|
|
|
@ -48,6 +48,7 @@ Rectangle {
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
|
|
Loading…
Reference in New Issue