Skip to content

Commit

Permalink
fix: folder not support wheel event on window mode
Browse files Browse the repository at this point in the history
search edit not define..

Issue: linuxdeepin/developer-center#8972
  • Loading branch information
kegechen committed Jun 20, 2024
1 parent f827815 commit 5f3d718
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions qml/FolderGridViewPopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Popup {
scrollGestureEnabled: false

// TODO: this might not be the correct way to handle wheel
onWheel: {
onWheel: function (wheel) {
let xDelta = wheel.angleDelta.x / 8
let yDelta = wheel.angleDelta.y / 8
let toPage = 0; // -1 prev, +1 next, 0 don't change
Expand All @@ -145,14 +145,8 @@ Popup {
toPage = (xDelta > 0) ? 1 : -1
}
if (toPage < 0) {
if (!searchEdit.focus) { // reset keyboard focus when using mouse to flip page, but keep searchEdit focus
baseLayer.focus = true
}
decrementPageIndex(folderPagesView)
} else if (toPage > 0) {
if (!searchEdit.focus) { // reset keyboard focus when using mouse to flip page, but keep searchEdit focus
baseLayer.focus = true
}
incrementPageIndex(folderPagesView)
}
}
Expand Down

0 comments on commit 5f3d718

Please sign in to comment.