Fix annoying touch overlap in room list

This commit is contained in:
Nicolas Werner 2021-07-31 11:04:47 +02:00
parent 5b5a89b522
commit 5b0bd26795
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 27 additions and 20 deletions

View file

@ -212,9 +212,9 @@ ScrollView {
// force current read index to update // force current read index to update
onTriggered: { onTriggered: {
if (chat.model) { if (chat.model)
chat.model.setCurrentIndex(chat.model.currentIndex); chat.model.setCurrentIndex(chat.model.currentIndex);
}
} }
interval: 1000 interval: 1000
} }

View file

@ -172,8 +172,12 @@ Page {
} }
] ]
// 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 { TapHandler {
margin: -Nheko.paddingSmall
acceptedButtons: Qt.RightButton acceptedButtons: Qt.RightButton
onSingleTapped: { onSingleTapped: {
if (!TimelineManager.isInvite) if (!TimelineManager.isInvite)
@ -181,6 +185,7 @@ Page {
} }
gesturePolicy: TapHandler.ReleaseWithinBounds gesturePolicy: TapHandler.ReleaseWithinBounds
acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus | DeviceType.TouchPad
} }
TapHandler { TapHandler {
@ -196,7 +201,9 @@ Page {
HoverHandler { HoverHandler {
id: hovered id: hovered
margin: -Nheko.paddingSmall acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus | DeviceType.TouchPad
}
} }
RowLayout { RowLayout {