fix(StatusChatListCategoryItem): Disable sensor when chevron clicked
List items' mouse area was also triggered when chevron (sub menu) button was clicked so it was unsetting the opened variable which is responsible for opening/closing the chats list.
This commit is contained in:
parent
0c0d9bf919
commit
56212c547a
|
@ -42,14 +42,15 @@ Column {
|
||||||
|
|
||||||
highlighted: statusChatListCategory.dragged
|
highlighted: statusChatListCategory.dragged
|
||||||
sensor.onClicked: {
|
sensor.onClicked: {
|
||||||
if (mouse.button === Qt.RightButton && showActionButtons && !!statusChatListCategory.popupMenu) {
|
if (sensor.enabled) {
|
||||||
highlighted = true
|
if (mouse.button === Qt.RightButton && showActionButtons && !!statusChatListCategory.popupMenu) {
|
||||||
popupMenuSlot.item.popup(mouse.x + 4, mouse.y + 6)
|
highlighted = true;
|
||||||
return
|
popupMenuSlot.item.popup(mouse.x + 4, mouse.y + 6);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
statusChatListCategory.opened = !opened;
|
||||||
}
|
}
|
||||||
statusChatListCategory.opened = !opened
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onTitleClicked: statusChatListCategory.opened = !opened
|
onTitleClicked: statusChatListCategory.opened = !opened
|
||||||
onToggleButtonClicked: statusChatListCategory.opened = !opened
|
onToggleButtonClicked: statusChatListCategory.opened = !opened
|
||||||
onMenuButtonClicked: {
|
onMenuButtonClicked: {
|
||||||
|
|
|
@ -60,7 +60,15 @@ StatusListItem {
|
||||||
icon.name: "chevron-down"
|
icon.name: "chevron-down"
|
||||||
icon.width: 18
|
icon.width: 18
|
||||||
icon.rotation: statusChatListCategoryItem.opened ? 0 : 270
|
icon.rotation: statusChatListCategoryItem.opened ? 0 : 270
|
||||||
onClicked: statusChatListCategoryItem.toggleButtonClicked(mouse)
|
onPressed: {
|
||||||
|
sensor.enabled = false;
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
statusChatListCategoryItem.toggleButtonClicked(mouse);
|
||||||
|
}
|
||||||
|
onReleased: {
|
||||||
|
sensor.enabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue