mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 18:25:57 +00:00
Merge pull request #1754 from zed-industries/fix-list-scroll
Pass the current view id when painting List's mouse region instead of 10
This commit is contained in:
commit
6ac0b81778
1 changed files with 4 additions and 3 deletions
|
@ -264,8 +264,8 @@ impl Element for List {
|
|||
let visible_bounds = visible_bounds.intersection(bounds).unwrap_or_default();
|
||||
cx.scene.push_layer(Some(visible_bounds));
|
||||
|
||||
cx.scene
|
||||
.push_mouse_region(MouseRegion::new::<Self>(10, 0, bounds).on_scroll({
|
||||
cx.scene.push_mouse_region(
|
||||
MouseRegion::new::<Self>(cx.current_view_id(), 0, bounds).on_scroll({
|
||||
let state = self.state.clone();
|
||||
let height = bounds.height();
|
||||
let scroll_top = scroll_top.clone();
|
||||
|
@ -278,7 +278,8 @@ impl Element for List {
|
|||
cx,
|
||||
)
|
||||
}
|
||||
}));
|
||||
}),
|
||||
);
|
||||
|
||||
let state = &mut *self.state.0.borrow_mut();
|
||||
for (mut element, origin) in state.visible_elements(bounds, scroll_top) {
|
||||
|
|
Loading…
Reference in a new issue