Skip to content
Snippets Groups Projects
Commit d35bbb35 authored by Joe Donofry's avatar Joe Donofry
Browse files

Add timer for scrolling to avoid mouse movement conflicts

parent 9f160fb5
No related branches found
No related tags found
1 merge request!20Completer scrolling
Pipeline #2426 failed
...@@ -94,6 +94,13 @@ Popup { ...@@ -94,6 +94,13 @@ Popup {
enabled: !Settings.mobileMode enabled: !Settings.mobileMode
} }
Timer {
id: deadTimer
interval: 50
}
onContentYChanged: deadTimer.restart()
reuseItems: true reuseItems: true
anchors.fill: parent anchors.fill: parent
implicitWidth: fullWidth ? parent.width : contentItem.childrenRect.width implicitWidth: fullWidth ? parent.width : contentItem.childrenRect.width
...@@ -115,7 +122,7 @@ Popup { ...@@ -115,7 +122,7 @@ Popup {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onPositionChanged: popup.currentIndex = model.index onPositionChanged: if (!listView.moving && !deadTimer.running) popup.currentIndex = model.index
onClicked: { onClicked: {
popup.completionClicked(completer.completionAt(model.index)); popup.completionClicked(completer.completionAt(model.index));
if (popup.completerName == "room") if (popup.completerName == "room")
...@@ -125,6 +132,7 @@ Popup { ...@@ -125,6 +132,7 @@ Popup {
rippleTarget: mouseArea rippleTarget: mouseArea
color: Qt.rgba(Nheko.colors.base.r, Nheko.colors.base.g, Nheko.colors.base.b, 0.5) color: Qt.rgba(Nheko.colors.base.r, Nheko.colors.base.g, Nheko.colors.base.b, 0.5)
} }
}
DelegateChooser { DelegateChooser {
id: chooser id: chooser
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment