diff options
| author | Ben Bridle <bridle.benjamin@gmail.com> | 2024-06-01 10:54:49 +1200 | 
|---|---|---|
| committer | Ben Bridle <bridle.benjamin@gmail.com> | 2024-06-01 10:54:49 +1200 | 
| commit | 2f6575f349c560a625af872adcbcb9cc82b84774 (patch) | |
| tree | dab28b20135b618bbd19980caf620638d3716eb2 | |
| parent | 8866d8f43679dbfa286e3fb827c238dc616619df (diff) | |
| download | phosphor-2f6575f349c560a625af872adcbcb9cc82b84774.zip | |
Fix scroll direction
Previously, scroll values would increase in the upwards and leftwards
directions. They now increase in the downward and rightward directions.
| -rw-r--r-- | src/window_manager.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/window_manager.rs b/src/window_manager.rs index 9322adb..a5d2038 100644 --- a/src/window_manager.rs +++ b/src/window_manager.rs @@ -64,12 +64,12 @@ impl WindowManager {                              MouseWheel {delta, ..} => match delta {                                  MouseScrollDelta::LineDelta(x, y) => { -                                    let (x, y) = (x as f64, y as f64); +                                    let (x, y) = (-x as f64, -y as f64);                                      if x != 0.0 {window.controller.on_line_scroll_horizontal(x)}                                      if y != 0.0 {window.controller.on_line_scroll_vertical(y)}                                  }                                  MouseScrollDelta::PixelDelta(point) => { -                                    let (x, y) = (point.x, point.y); +                                    let (x, y) = (-point.x, -point.y);                                      if x != 0.0 {window.controller.on_pixel_scroll_horizontal(x)}                                      if y != 0.0 {window.controller.on_pixel_scroll_vertical(y)}                                  } | 
