Fix ListView scrollbar dragging

With af08a56 properly passing down relativized events we don't have to implement
to scrollbar dragging logic ourselves anymore, but can rely on the one in
cursive.

This also fixes #839
This commit is contained in:
Henrik Friedrichsen
2022-08-19 19:02:15 +02:00
parent 2311e49ea2
commit 5db79d5b2e

View File

@@ -305,8 +305,6 @@ impl<I: ListItem> View for ListView<I> {
offset,
} => {
if self.scroller.get_show_scrollbars()
&& position.y > 0
&& position.y <= self.last_size.y
&& position
.checked_sub(offset)
.map(|p| self.scroller.start_drag(p))
@@ -372,6 +370,7 @@ impl<I: ListItem> View for ListView<I> {
event: MouseEvent::Release(MouseButton::Left),
..
} => {
log::debug!("releasing scroller");
self.scroller.release_grab();
}
_ => {