1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00
Files
egui/crates
Emil Ernerfeldt 1b77d7047e Improve modifier handling when scrolling (#7678)
### Problem
Letting go of the modifier key before the last momentum-scroll events
arrive will cause the scroll direction to change. This problem can be
seen by going to egui.rs and opening the "Scene" example. Hold down
shift, start a momentum-scroll (on a Mac trackpad), then quickly let go
of shift: you'll see the scroll direction change, which feels wrong.

### Solution
Store the modifiers at the start of the event, thanks to the new `phase`
info added in
* https://github.com/emilk/egui/pull/7669

Note that this solution only works on native; not on web.

### Other
* Break out wheel/scroll handling into own file
* Simplify it a lot by deciding late on wether an input is a scroll or a
zoom
* Assume input is already smooth if there are `phase` events
2025-11-03 11:53:55 +01:00
..
2025-10-15 12:13:52 +02:00