iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
24.69k stars 1.16k forks source link

mouse scroll event delta doesn't fire the ScrollDelta::Pixels only the ScrollDelta::Lines #2561

Open icedpygui opened 2 months ago

icedpygui commented 2 months ago

Is your issue REALLY a bug?

updating this comment: In viewer.rs line 172, your match is with either lines or pixels so you return lines regardless. So maybe you should separate this out or just do lines??

Is there an existing issue for this?

Is this issue related to iced?

What happened?

While trying to incorporate the mouse ScrollDelta::Pixels into icedpygui, previously only used the ScrollDelta::Lines, I have determined that it does not fired the Pixels, only the Lines. I ran the event example and since it displays all of the events, Pixels is missing. I used the example in the master and the example in the latest repos.

What is the expected behavior?

the event ScrollDelta::Pixels is fired.

Version

master

Operating System

Linux

Do you have any log output?

Here's a print out of part of the output of the event example.

Keyboard(ModifiersChanged(Modifiers(0x0)))
Keyboard(ModifiersChanged(Modifiers(0x0)))
Mouse(CursorMoved { position: Point { x: 526.7842, y: 579.4448 } })
Mouse(WheelScrolled { delta: Lines { x: 0.0, y: -1.0 } }) <---------only Lines
Keyboard(ModifiersChanged(Modifiers(0x0)))
Keyboard(ModifiersChanged(Modifiers(0x0)))
Mouse(CursorMoved { position: Point { x: 526
edwloef commented 1 month ago

ScrollDelta::Pixels is fired when e.g. scrolling on a trackpad.