Skip to content

Commit

Permalink
Round ScrollDelta::Lines in TextEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Sep 21, 2023
1 parent 25d47c3 commit da5dd25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widget/src/text_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ impl Update {
action(Action::Scroll {
lines: match delta {
mouse::ScrollDelta::Lines { y, .. } => {
-y as i32 * 4
-y.round() as i32 * 4
}
mouse::ScrollDelta::Pixels { y, .. } => {
-y.signum() as i32
Expand Down

0 comments on commit da5dd25

Please sign in to comment.