diff options
author | 2023-09-21 06:07:19 +0200 | |
---|---|---|
committer | 2023-09-21 06:07:19 +0200 | |
commit | da5dd2526a2d9ee27e9405ed19c0f7a641160c54 (patch) | |
tree | 0906e090720378ad4d6d6291dbb6c982042212f8 /widget/src/text_editor.rs | |
parent | 25d47c3238ce23854e2c78e2bd9ad2b1f4b326b3 (diff) | |
download | iced-da5dd2526a2d9ee27e9405ed19c0f7a641160c54.tar.gz iced-da5dd2526a2d9ee27e9405ed19c0f7a641160c54.tar.bz2 iced-da5dd2526a2d9ee27e9405ed19c0f7a641160c54.zip |
Round `ScrollDelta::Lines` in `TextEditor`
Diffstat (limited to 'widget/src/text_editor.rs')
-rw-r--r-- | widget/src/text_editor.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index 4191e02c..ac927fbc 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -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 |