Fix launcher keyboard scrolling
This commit is contained in:
@@ -233,12 +233,14 @@ Item {
|
||||
root.filterText = nextFilter
|
||||
root.selectedIndex = 0
|
||||
root.cursorActive = true
|
||||
root.hoverArmed = false
|
||||
root.rebuildDisplay()
|
||||
}
|
||||
|
||||
function select(delta) {
|
||||
if (displayModel.count === 0) return
|
||||
root.cursorActive = true
|
||||
root.hoverArmed = false
|
||||
root.selectedIndex = (root.selectedIndex + delta + displayModel.count) % displayModel.count
|
||||
resultList.positionViewAtIndex(root.selectedIndex, ListView.Contain)
|
||||
}
|
||||
@@ -456,6 +458,7 @@ Item {
|
||||
} else if (event.key === Qt.Key_Home) {
|
||||
if (displayModel.count > 0) {
|
||||
root.cursorActive = true
|
||||
root.hoverArmed = false
|
||||
root.selectedIndex = 0
|
||||
resultList.positionViewAtIndex(root.selectedIndex, ListView.Contain)
|
||||
}
|
||||
@@ -463,6 +466,7 @@ Item {
|
||||
} else if (event.key === Qt.Key_End) {
|
||||
if (displayModel.count > 0) {
|
||||
root.cursorActive = true
|
||||
root.hoverArmed = false
|
||||
root.selectedIndex = displayModel.count - 1
|
||||
resultList.positionViewAtIndex(root.selectedIndex, ListView.Contain)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user