mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Fix annoying touch overlap in room list
This commit is contained in:
parent
5b5a89b522
commit
5b0bd26795
2 changed files with 27 additions and 20 deletions
|
@ -212,9 +212,9 @@ ScrollView {
|
|||
|
||||
// force current read index to update
|
||||
onTriggered: {
|
||||
if (chat.model) {
|
||||
if (chat.model)
|
||||
chat.model.setCurrentIndex(chat.model.currentIndex);
|
||||
}
|
||||
|
||||
}
|
||||
interval: 1000
|
||||
}
|
||||
|
|
|
@ -172,31 +172,38 @@ Page {
|
|||
}
|
||||
]
|
||||
|
||||
TapHandler {
|
||||
margin: -Nheko.paddingSmall
|
||||
acceptedButtons: Qt.RightButton
|
||||
onSingleTapped: {
|
||||
if (!TimelineManager.isInvite)
|
||||
roomContextMenu.show(roomId, tags);
|
||||
// NOTE(Nico): We want to prevent the touch areas from overlapping. For some reason we need to add 1px of padding for that...
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 1
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton
|
||||
onSingleTapped: {
|
||||
if (!TimelineManager.isInvite)
|
||||
roomContextMenu.show(roomId, tags);
|
||||
|
||||
}
|
||||
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus | DeviceType.TouchPad
|
||||
}
|
||||
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
margin: -Nheko.paddingSmall
|
||||
onSingleTapped: Rooms.setCurrentRoom(roomId)
|
||||
onLongPressed: {
|
||||
if (!isInvite)
|
||||
roomContextMenu.show(roomId, tags);
|
||||
TapHandler {
|
||||
margin: -Nheko.paddingSmall
|
||||
onSingleTapped: Rooms.setCurrentRoom(roomId)
|
||||
onLongPressed: {
|
||||
if (!isInvite)
|
||||
roomContextMenu.show(roomId, tags);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
id: hovered
|
||||
HoverHandler {
|
||||
id: hovered
|
||||
|
||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus | DeviceType.TouchPad
|
||||
}
|
||||
|
||||
margin: -Nheko.paddingSmall
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
|
Loading…
Reference in a new issue