Fix right-clicking delegates again
I accidentally broke this while trying to dance around the two new overlapping TapHandlers, but this didn't work. What ended up happening is that you couldn't right-click non-message delegates anymore (such as images, files, etc.) I *still* couldn't figure out how to get overlapping TapHandlers to work, so I just switched to a MouseArea instead. This makes everything work as expected now.
This commit is contained in:
@@ -58,20 +58,19 @@ RowLayout {
|
|||||||
menu.popup(root.QQC2.Overlay.overlay);
|
menu.popup(root.QQC2.Overlay.overlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
HoverHandler {
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
}
|
|
||||||
|
|
||||||
// tapping to open profile
|
// tapping to open profile
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onTapped: RoomManager.resolveResource(root.author.uri)
|
onTapped: RoomManager.resolveResource(root.author.uri)
|
||||||
}
|
}
|
||||||
|
|
||||||
// right-clicking/long-press for context menu
|
// right-clicking/long-press for context menu
|
||||||
TapHandler {
|
MouseArea {
|
||||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad | PointerDevice.Stylus
|
anchors.fill: parent
|
||||||
|
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
onTapped: nameButton.openUserMenu()
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
|
onPressed: nameButton.openUserMenu()
|
||||||
}
|
}
|
||||||
TapHandler {
|
TapHandler {
|
||||||
acceptedDevices: PointerDevice.TouchScreen
|
acceptedDevices: PointerDevice.TouchScreen
|
||||||
|
|||||||
@@ -148,8 +148,8 @@ MessageDelegateBase {
|
|||||||
showBackground: root.cardBackground && !NeoChatConfig.compactLayout
|
showBackground: root.cardBackground && !NeoChatConfig.compactLayout
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
|
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad | PointerDevice.Stylus
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
gesturePolicy: TapHandler.ReleaseWithinBounds
|
|
||||||
onTapped: _private.showMessageMenu()
|
onTapped: _private.showMessageMenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user