Fix vertical scroll for TextEditor
This commit is contained in:
parent
7373dd856b
commit
68d49459ce
1 changed files with 3 additions and 2 deletions
|
|
@ -545,8 +545,9 @@ impl Update {
|
||||||
action(Action::Scroll {
|
action(Action::Scroll {
|
||||||
lines: match delta {
|
lines: match delta {
|
||||||
mouse::ScrollDelta::Lines { y, .. } => {
|
mouse::ScrollDelta::Lines { y, .. } => {
|
||||||
if y > 0.0 {
|
if y.abs() > 0.0 {
|
||||||
-(y * 4.0).min(1.0) as i32
|
(y.signum() * -(y.abs() * 4.0).max(1.0))
|
||||||
|
as i32
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue