Reverse horizontal scroll direction (#2105)
This commit is contained in:
parent
1c68be0631
commit
85baf79d17
8 changed files with 46 additions and 26 deletions
|
|
@ -1000,8 +1000,7 @@ extern "C" fn scroll_wheel(this: &Object, _sel: Sel, event: id) {
|
|||
let state = &mut *(state_ptr as *mut ViewState);
|
||||
|
||||
let delta = {
|
||||
// macOS horizontal sign convention is the inverse of winit.
|
||||
let (x, y) = (event.scrollingDeltaX() * -1.0, event.scrollingDeltaY());
|
||||
let (x, y) = (event.scrollingDeltaX(), event.scrollingDeltaY());
|
||||
if event.hasPreciseScrollingDeltas() == YES {
|
||||
let delta = LogicalPosition::new(x, y).to_physical(state.get_scale_factor());
|
||||
MouseScrollDelta::PixelDelta(delta)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue