Allow right-clicking on a room without selecting it
Same idea as the fix I did for spaces, we introduce a new signal called selected instead of using ItemDelegate's button signals.
This commit is contained in:
committed by
Tobias Fella
parent
006da1fb16
commit
e9e1e223f7
@@ -31,13 +31,21 @@ Delegates.RoundedItemDelegate {
|
||||
|
||||
readonly property bool hasNotifications: notificationCount > 0
|
||||
|
||||
signal selected()
|
||||
|
||||
Accessible.name: root.displayName
|
||||
|
||||
onPressAndHold: createRoomListContextMenu()
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton
|
||||
onTapped: createRoomListContextMenu()
|
||||
acceptedButtons: Qt.RightButton | Qt.LeftButton
|
||||
onTapped: (eventPoint, button) => {
|
||||
if (button === Qt.RightButton) {
|
||||
root.createRoomListContextMenu();
|
||||
} else {
|
||||
root.selected();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: RowLayout {
|
||||
|
||||
Reference in New Issue
Block a user