This commit is contained in:
Mikayla Maki 2023-06-29 17:19:35 -07:00
parent 5366631173
commit 73b0f3b23d
No known key found for this signature in database

View file

@ -273,7 +273,11 @@ impl Pane {
Some(("New...".into(), None)), Some(("New...".into(), None)),
cx, cx,
|pane, cx| pane.deploy_new_menu(cx), |pane, cx| pane.deploy_new_menu(cx),
|pane, cx| pane.tab_bar_context_menu.handle.update(cx, |menu, _| menu.delay_cancel()), |pane, cx| {
pane.tab_bar_context_menu
.handle
.update(cx, |menu, _| menu.delay_cancel())
},
pane.tab_bar_context_menu pane.tab_bar_context_menu
.handle_if_kind(TabBarContextMenuKind::New), .handle_if_kind(TabBarContextMenuKind::New),
)) ))
@ -284,7 +288,11 @@ impl Pane {
Some(("Split Pane".into(), None)), Some(("Split Pane".into(), None)),
cx, cx,
|pane, cx| pane.deploy_split_menu(cx), |pane, cx| pane.deploy_split_menu(cx),
|pane, cx| pane.tab_bar_context_menu.handle.update(cx, |menu, _| menu.delay_cancel()), |pane, cx| {
pane.tab_bar_context_menu
.handle
.update(cx, |menu, _| menu.delay_cancel())
},
pane.tab_bar_context_menu pane.tab_bar_context_menu
.handle_if_kind(TabBarContextMenuKind::Split), .handle_if_kind(TabBarContextMenuKind::Split),
)) ))
@ -1419,7 +1427,10 @@ impl Pane {
.into_any() .into_any()
} }
pub fn render_tab_bar_button<F1: 'static + Fn(&mut Pane, &mut EventContext<Pane>), F2: 'static + Fn(&mut Pane, &mut EventContext<Pane>)>( pub fn render_tab_bar_button<
F1: 'static + Fn(&mut Pane, &mut EventContext<Pane>),
F2: 'static + Fn(&mut Pane, &mut EventContext<Pane>),
>(
index: usize, index: usize,
icon: &'static str, icon: &'static str,
is_active: bool, is_active: bool,