Skip to content

Commit

Permalink
Merge pull request #170 from Redhawk18/main
Browse files Browse the repository at this point in the history
support normal scrolling instead of inversed scrolling
  • Loading branch information
genusistimelord committed Aug 16, 2023
2 parents d2c0441 + 71362ca commit eceab41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/native/number_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,13 @@ where
),
}
}
// This section from line 502 to 516 was owned by 13r0ck (https://github.com/13r0ck).

Event::Mouse(mouse::Event::WheelScrolled { delta }) => {
let negative = match delta {
let positive = match delta {
mouse::ScrollDelta::Lines { y, .. }
| mouse::ScrollDelta::Pixels { y, .. } => y.is_sign_negative(),
| mouse::ScrollDelta::Pixels { y, .. } => y.is_sign_positive(),
};
if negative {
if positive {
self.increase_val(shell);
} else {
self.decrease_val(shell);
Expand Down

0 comments on commit eceab41

Please sign in to comment.