| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The popup's WheelHandler added the scroll delta to contentY. By that point the delta has already been through the inversion handling above it, so a positive value means an "up" gesture, which has to move the view towards the start of the list - contentY has to go down, not up. Adding it scrolled the dropdown the wrong way round for everyone whose desktop is not set to natural scrolling. The closed-state handler just above it already gets this right: a positive delta steps to the previous item. So the two disagreed, and the same gesture moved the selection one way with the popup closed and the opposite way with it open. Subtract the delta instead, which lines the popup up with the closed-state handler and with the way Qt scrolls its own views. Closes raspberrypi#1589
|
@tdewey-rpi this is the other half of #1534, the popup direction. Happy to switch it to follow the OS scroll setting instead if you'd prefer that. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The popup's WheelHandler does contentY + dy. By that point dy has already been through the inversion handling, so a positive value means an "up" gesture, meaning a lower contentY. Adding it scrolled the popup backwards unless your desktop is set to natural scrolling. Subtracting fixes it.
The closed-state handler already gets this right, so the same gesture moved the selection opposite ways with the popup open and closed. #1534 fixed the closed half for #1532; this is the other one.
I left isScrollInverted() alone, so the popup follows the gesture rather than the OS content direction, same as the closed state. On a natural-scrolling desktop the dropdown now moves with the wheel, not the content. If you'd rather it track the OS direction, drop the inversion here instead and I'll send that version.
Fixes #1589