Fix mouse wheel not working on eventList

This commit is contained in:
miruka
2019-09-06 16:08:16 -04:00
parent d353056db9
commit e1f24657f1
4 changed files with 37 additions and 6 deletions

View File

@@ -92,6 +92,8 @@ Rectangle {
property bool ownEventsOnRight:
width < theme.chat.eventList.ownEventsOnRightUnderWidth
property alias cursorShape: mouseArea.cursorShape
function canCombine(item, itemAfter) {
if (! item || ! itemAfter) return false
@@ -154,6 +156,19 @@ Rectangle {
}
delegate: EventDelegate {}
MouseArea {
id: mouseArea
anchors.fill: parent
acceptedButtons: Qt.NoButton
onWheel: Utils.smartVerticalFlick(
eventList,
200 * Qt.styleHints.wheelScrollLines *
(wheel.angleDelta.y < 0 ? 1 : -1),
3
)
}
}
}