Don't allow long-pressing on non-touchscreen devices
It isn't the right kind of interaction on a computer with a mouse or trackpad, it should be relegated to touchscreen only. This should hopefully cover everything from room list delegates to messages.
This commit is contained in:
@@ -128,7 +128,12 @@ QQC2.Control {
|
||||
TapHandler {
|
||||
enabled: root.time.toString() !== "Invalid Date"
|
||||
acceptedButtons: Qt.LeftButton
|
||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad | PointerDevice.Stylus
|
||||
onTapped: RoomManager.maximizeCode(root.author, root.time, root.display, root.componentAttributes.class)
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedDevices: PointerDevice.TouchScreen
|
||||
onLongPressed: root.showMessageMenu()
|
||||
}
|
||||
|
||||
|
||||
@@ -68,11 +68,13 @@ TimelineDelegate {
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton
|
||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad | PointerDevice.Stylus
|
||||
onTapped: _private.showMessageMenu()
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
acceptedDevices: PointerDevice.TouchScreen
|
||||
onLongPressed: _private.showMessageMenu()
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ ColumnLayout {
|
||||
});
|
||||
map.open();
|
||||
}
|
||||
}
|
||||
TapHandler {
|
||||
acceptedDevices: PointerDevice.TouchScreen
|
||||
onLongPressed: openMessageContext("")
|
||||
}
|
||||
TapHandler {
|
||||
|
||||
@@ -90,6 +90,9 @@ ColumnLayout {
|
||||
});
|
||||
map.open();
|
||||
}
|
||||
}
|
||||
TapHandler {
|
||||
acceptedDevices: PointerDevice.TouchScreen
|
||||
onLongPressed: openMessageContext("")
|
||||
}
|
||||
TapHandler {
|
||||
|
||||
@@ -323,6 +323,7 @@ TimelineDelegate {
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedDevices: PointerDevice.TouchScreen
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onLongPressed: _private.showMessageMenu()
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ QQC2.Control {
|
||||
|
||||
TapHandler {
|
||||
enabled: !quoteText.hoveredLink
|
||||
acceptedDevices: PointerDevice.TouchScreen
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onLongPressed: root.showMessageMenu()
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@ a{
|
||||
TapHandler {
|
||||
enabled: !root.hoveredLink
|
||||
acceptedButtons: Qt.LeftButton
|
||||
acceptedDevices: PointerDevice.TouchScreen
|
||||
onLongPressed: root.showMessageMenu()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user