Add keyboard control over context menus
Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
parent
77acba9e4c
commit
ac34229118
5 changed files with 125 additions and 65 deletions
|
@ -10,11 +10,11 @@ fn build_menu(cx: &mut WindowContext, header: impl Into<SharedString>) -> View<C
|
|||
ContextMenu::build(cx, |menu, _| {
|
||||
menu.header(header)
|
||||
.separator()
|
||||
.entry("Print current time", |_event, cx| {
|
||||
.entry("Print current time", |cx| {
|
||||
println!("dispatching PrintCurrentTime action");
|
||||
cx.dispatch_action(PrintCurrentDate.boxed_clone())
|
||||
})
|
||||
.entry("Print best foot", |_event, cx| {
|
||||
.entry("Print best foot", |cx| {
|
||||
cx.dispatch_action(PrintBestFood.boxed_clone())
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue