FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(ImComboBox): scroll the dropdown in the direction of the wheel by 4RH1T3CT0R7 · Pull Request #1713 · raspberrypi/rpi-imager · GitHub

fix(ImComboBox): scroll the dropdown in the direction of the wheel - #1713

Open
4RH1T3CT0R7 wants to merge 1 commit into
raspberrypi:mainfrom
4RH1T3CT0R7:fix/combobox-popup-scroll-direction
Open

4RH1T3CT0R7 wants to merge 1 commit into
raspberrypi:mainfrom
4RH1T3CT0R7:fix/combobox-popup-scroll-direction

Conversation

4RH1T3CT0R7 commented Aug 24, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

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

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

Copy link
Copy Markdown
Contributor Author

@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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Selection boxes in localization scroll opposite from mouse wheel

1 participant


Back | FazBrowse Home | New Git URL