WIP
co-authored-by: conrad <conrad@zed.dev> co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
6985b70859
commit
2c4d83c9af
96 changed files with 1926 additions and 1955 deletions
|
@ -71,8 +71,8 @@ impl ModalLayer {
|
|||
}
|
||||
}
|
||||
|
||||
impl Render<Self> for ModalLayer {
|
||||
type Element = Div<Self>;
|
||||
impl Render for ModalLayer {
|
||||
type Element = Div;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
let Some(active_modal) = &self.active_modal else {
|
||||
|
@ -97,11 +97,11 @@ impl Render<Self> for ModalLayer {
|
|||
h_stack()
|
||||
// needed to prevent mouse events leaking to the
|
||||
// UI below. // todo! for gpui3.
|
||||
.on_any_mouse_down(|_, _, cx| cx.stop_propagation())
|
||||
.on_any_mouse_up(|_, _, cx| cx.stop_propagation())
|
||||
.on_mouse_down_out(|this: &mut Self, event, cx| {
|
||||
.on_any_mouse_down(|_, cx| cx.stop_propagation())
|
||||
.on_any_mouse_up(|_, cx| cx.stop_propagation())
|
||||
.on_mouse_down_out(cx.listener(|this, _, cx| {
|
||||
this.hide_modal(cx);
|
||||
})
|
||||
}))
|
||||
.child(active_modal.modal.clone()),
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue