Remove ViewContext::dispatch_action

This commit is contained in:
Antonio Scandurra 2023-05-01 15:48:41 +02:00
parent d815fc88ae
commit c4472b0786
41 changed files with 574 additions and 670 deletions

View file

@ -485,7 +485,11 @@ impl ContextMenu {
.contained()
.with_style(style.container)
})
.on_down_out(MouseButton::Left, |_, _, cx| cx.dispatch_action(Cancel))
.on_down_out(MouseButton::Right, |_, _, cx| cx.dispatch_action(Cancel))
.on_down_out(MouseButton::Left, |_, this, cx| {
this.cancel(&Default::default(), cx);
})
.on_down_out(MouseButton::Right, |_, this, cx| {
this.cancel(&Default::default(), cx);
})
}
}