Skip to content

Commit

Permalink
Reverse horizontal scrolling on windows (#966)
Browse files Browse the repository at this point in the history
* Reverse horizontal scrolling on windows

* Add link to winit issue

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
  • Loading branch information
aevyrie and emilk authored Dec 20, 2021
1 parent dd99f68 commit c69fe94
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@ impl State {
// https://github.com/rust-windowing/winit/issues/1695 being closed
delta.x *= -1.0;
}
if cfg!(target_os = "windows") {
delta.x *= -1.0; // until https://github.com/rust-windowing/winit/pull/2101 is merged
}

if self.egui_input.modifiers.ctrl || self.egui_input.modifiers.command {
// Treat as zoom instead:
Expand Down

0 comments on commit c69fe94

Please sign in to comment.