Only scroll text box when cursor is above it
This commit is contained in:
parent
18f2ca563f
commit
1151c64323
1 changed files with 31 additions and 27 deletions
|
|
@ -531,7 +531,9 @@ where
|
|||
status = Status::Captured;
|
||||
}
|
||||
}
|
||||
Event::Mouse(MouseEvent::WheelScrolled { delta }) => match delta {
|
||||
Event::Mouse(MouseEvent::WheelScrolled { delta }) => {
|
||||
if let Some(_p) = cursor_position.position_in(layout.bounds()) {
|
||||
match delta {
|
||||
ScrollDelta::Lines { x, y } => {
|
||||
//TODO: this adjustment is just a guess!
|
||||
state.scroll_pixels = 0.0;
|
||||
|
|
@ -559,7 +561,9 @@ where
|
|||
}
|
||||
status = Status::Captured;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue