Skip to content

Bug: Choppy/unsmooth scrolling UP using laptop touchpad (GadgetListBox) #2584

@DevGeniusCode

Description

@DevGeniusCode

There is a scrolling rendering/input issue when using a laptop touchpad to scroll upwards in UI lists. The scrolling list scrolls up momentarily and then jumps back down, whereas other scrolling methods work perfectly.

output_cut.mp4

Steps to Reproduce:

  1. Open the game on a laptop with a touchpad.
  2. Navigate to any menu containing a vertical list box (GadgetListBox).
  3. Use the touchpad to scroll UP.
  4. Observe the glitchy/choppy scrolling behavior.

Expected Behavior:
Scrolling up via the touchpad should be as smooth and consistent as scrolling down.

Additional Context / Diagnostics:

  • 🟢 Scrolling DOWN via touchpad is perfectly smooth.
  • 🟢 Scrolling both UP and DOWN using a standard physical mouse wheel works flawlessly.
  • The issue is isolated strictly to upward touchpad scroll inputs.

Investigation so far:
I attempted to debug this and briefly looked into the UI elements' logic (e.g., GadgetListBox.cpp, GadgetVerticalSlider.cpp), specifically around the adjustDisplay function and slider positioning. My suspicion is that touchpad delta events (which are often continuous and fractional compared to discrete mouse wheel ticks) might be mishandled, incorrectly rounded, or truncated when calculating the upward (negative/positive) scroll offset. However, I wasn't able to successfully implement a complete fix for this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIFor graphical user interfaceGenRelates to GeneralsMinorSeverity: Minor < Major < Critical < BlockerZHRelates to Zero Hour

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions