Dock menu
This commit is contained in:
parent
9d742b90c3
commit
eb04160d2d
3 changed files with 44 additions and 13 deletions
|
@ -69,6 +69,11 @@ impl<V: Render> ContextMenu<V> {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn action(self, view: ListEntry<Self>, action: Box<dyn Action>) -> Self {
|
||||
// todo: add the keybindings to the list entry
|
||||
self.entry(view, move |_, cx| cx.dispatch_action(action.boxed_clone()))
|
||||
}
|
||||
|
||||
pub fn confirm(&mut self, _: &menu::Confirm, cx: &mut ViewContext<Self>) {
|
||||
// todo!()
|
||||
cx.emit(Dismiss);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue