Skip to content

Commit

Permalink
Make UniformList non-occluding. (#9806)
Browse files Browse the repository at this point in the history
Fixes #9723

Move the `occlude` in the places where they are needed.

Release Notes:

- Fixed right click in the project panel's empty region
([9723](#9723))

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
  • Loading branch information
SomeoneToIgnore and as-cii committed Mar 26, 2024
1 parent db9221a commit b8663e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/editor/src/editor.rs
Expand Up @@ -898,9 +898,7 @@ impl CompletionsMenu {
.max_w(px(640.))
.w(px(500.))
.overflow_y_scroll()
// Prevent a mouse down on documentation from being propagated to the editor,
// because that would move the cursor.
.on_mouse_down(MouseButton::Left, |_, cx| cx.stop_propagation())
.occlude()
})
} else {
None
Expand Down Expand Up @@ -989,6 +987,7 @@ impl CompletionsMenu {
.collect()
},
)
.occlude()
.max_h(max_height)
.track_scroll(self.scroll_handle.clone())
.with_width_from_item(widest_completion_ix);
Expand Down Expand Up @@ -1212,6 +1211,7 @@ impl CodeActionsMenu {
.px_2()
.py_1()
.max_h(max_height)
.occlude()
.track_scroll(self.scroll_handle.clone())
.with_width_from_item(
self.actions
Expand Down
1 change: 0 additions & 1 deletion crates/gpui/src/elements/uniform_list.rs
Expand Up @@ -48,7 +48,6 @@ where
interactivity: Interactivity {
element_id: Some(id),
base_style: Box::new(base_style),
occlude_mouse: true,

#[cfg(debug_assertions)]
location: Some(*core::panic::Location::caller()),
Expand Down

0 comments on commit b8663e5

Please sign in to comment.