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,7 +31,7 @@ Kirigami.ScrollablePage {
|
|||||||
delegate: RoomDelegate {
|
delegate: RoomDelegate {
|
||||||
id: roomDelegate
|
id: roomDelegate
|
||||||
filterText: ""
|
filterText: ""
|
||||||
onClicked: {
|
onSelected: {
|
||||||
root.chosen(roomDelegate.currentRoom.id)
|
root.chosen(roomDelegate.currentRoom.id)
|
||||||
}
|
}
|
||||||
connection: root.connection
|
connection: root.connection
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ QQC2.Dialog {
|
|||||||
|
|
||||||
connection: root.connection
|
connection: root.connection
|
||||||
|
|
||||||
onClicked: {
|
onSelected: {
|
||||||
RoomManager.enterRoom(currentRoom);
|
RoomManager.enterRoom(currentRoom);
|
||||||
root.close()
|
root.close()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,13 +31,21 @@ Delegates.RoundedItemDelegate {
|
|||||||
|
|
||||||
readonly property bool hasNotifications: notificationCount > 0
|
readonly property bool hasNotifications: notificationCount > 0
|
||||||
|
|
||||||
|
signal selected()
|
||||||
|
|
||||||
Accessible.name: root.displayName
|
Accessible.name: root.displayName
|
||||||
|
|
||||||
onPressAndHold: createRoomListContextMenu()
|
onPressAndHold: createRoomListContextMenu()
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton | Qt.LeftButton
|
||||||
onTapped: createRoomListContextMenu()
|
onTapped: (eventPoint, button) => {
|
||||||
|
if (button === Qt.RightButton) {
|
||||||
|
root.createRoomListContextMenu();
|
||||||
|
} else {
|
||||||
|
root.selected();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ Kirigami.Page {
|
|||||||
|
|
||||||
visible: categoryVisible || filterText.length > 0 || Config.mergeRoomList
|
visible: categoryVisible || filterText.length > 0 || Config.mergeRoomList
|
||||||
|
|
||||||
onClicked: RoomManager.enterRoom(currentRoom)
|
onSelected: RoomManager.enterRoom(currentRoom)
|
||||||
|
|
||||||
Keys.onEnterPressed: RoomManager.enterRoom(currentRoom)
|
Keys.onEnterPressed: RoomManager.enterRoom(currentRoom)
|
||||||
Keys.onReturnPressed: RoomManager.enterRoom(currentRoom)
|
Keys.onReturnPressed: RoomManager.enterRoom(currentRoom)
|
||||||
|
|||||||
Reference in New Issue
Block a user