Skip to content

fix(ImComboBox): use PlatformHelper for scroll direction in closed ComboBox#1534

Merged
tdewey-rpi merged 1 commit into
raspberrypi:mainfrom
4RH1T3CT0R7:dev/4rh1t3ct0r/fix-combobox-scroll-direction
Mar 4, 2026
Merged

fix(ImComboBox): use PlatformHelper for scroll direction in closed ComboBox#1534
tdewey-rpi merged 1 commit into
raspberrypi:mainfrom
4RH1T3CT0R7:dev/4rh1t3ct0r/fix-combobox-scroll-direction

Conversation

@4RH1T3CT0R7

@4RH1T3CT0R7 4RH1T3CT0R7 commented Mar 3, 2026

Copy link
Copy Markdown
Contributor
  • Fix inverted scroll direction for ComboBox dropdowns (timezone, keyboard layout, capital city) on Windows
  • Align the closed-state WheelHandler with the popup WheelHandler by using PlatformHelper.isScrollInverted() instead of event.inverted directly

Root Cause

ImComboBox.qml has two WheelHandler blocks:

  1. Closed ComboBox (line 138) — was using event.inverted directly
  2. Open popup list (line 399) — correctly uses PlatformHelper.isScrollInverted(event.inverted)

On Windows, Qt's event.inverted flag doesn't reliably reflect the OS scroll direction setting. PlatformHelper.isScrollInverted() works around this by reading the actual value from the Windows registry (PrecisionTouchPad\ScrollDirection). On macOS/Linux, it passes through event.inverted unchanged — so this fix has no behavioral change on those platforms.

Closes #1532

…mboBox

The closed-state WheelHandler was using event.inverted directly to detect
natural scrolling, but Qt doesn't reliably report the scroll direction on
Windows. The popup WheelHandler already used PlatformHelper.isScrollInverted()
which reads the actual OS setting (Windows registry). This inconsistency
caused inverted scroll direction for ComboBox dropdowns on Windows.

Align both handlers to use PlatformHelper.isScrollInverted() so the scroll
direction is correct on all platforms.

Closes raspberrypi#1532
@4RH1T3CT0R7 4RH1T3CT0R7 force-pushed the dev/4rh1t3ct0r/fix-combobox-scroll-direction branch from f87c7a5 to 820f647 Compare March 3, 2026 17:21
@tdewey-rpi tdewey-rpi merged commit 9e109af into raspberrypi:main Mar 4, 2026
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]: Scroll direction for language and time zone are wrong on Windows

2 participants