Add more detail to panel switcher interaction
This commit is contained in:
parent
2aa7c6f2b4
commit
4540f04dbe
3 changed files with 42 additions and 21 deletions
|
@ -3213,8 +3213,8 @@ impl Workspace {
|
|||
})
|
||||
}
|
||||
|
||||
fn actions(div: Div<Self>) -> Div<Self> {
|
||||
div
|
||||
fn actions(&self, div: Div<Self>) -> Div<Self> {
|
||||
self.add_workspace_actions_listeners(div)
|
||||
// cx.add_async_action(Workspace::open);
|
||||
// cx.add_async_action(Workspace::follow_next_collaborator);
|
||||
// cx.add_async_action(Workspace::close);
|
||||
|
@ -3263,15 +3263,15 @@ impl Workspace {
|
|||
.on_action(|this, e: &ToggleLeftDock, cx| {
|
||||
this.toggle_dock(DockPosition::Left, cx);
|
||||
})
|
||||
// cx.add_action(|workspace: &mut Workspace, _: &ToggleRightDock, cx| {
|
||||
// workspace.toggle_dock(DockPosition::Right, cx);
|
||||
// });
|
||||
// cx.add_action(|workspace: &mut Workspace, _: &ToggleBottomDock, cx| {
|
||||
// workspace.toggle_dock(DockPosition::Bottom, cx);
|
||||
// });
|
||||
// cx.add_action(|workspace: &mut Workspace, _: &CloseAllDocks, cx| {
|
||||
// workspace.close_all_docks(cx);
|
||||
// });
|
||||
.on_action(|workspace: &mut Workspace, _: &ToggleRightDock, cx| {
|
||||
workspace.toggle_dock(DockPosition::Right, cx);
|
||||
})
|
||||
.on_action(|workspace: &mut Workspace, _: &ToggleBottomDock, cx| {
|
||||
workspace.toggle_dock(DockPosition::Bottom, cx);
|
||||
})
|
||||
.on_action(|workspace: &mut Workspace, _: &CloseAllDocks, cx| {
|
||||
workspace.close_all_docks(cx);
|
||||
})
|
||||
// cx.add_action(Workspace::activate_pane_at_index);
|
||||
// cx.add_action(|workspace: &mut Workspace, _: &ReopenClosedItem, cx| {
|
||||
// workspace.reopen_closed_item(cx).detach();
|
||||
|
@ -3616,7 +3616,7 @@ impl Render for Workspace {
|
|||
context.add("Workspace");
|
||||
let ui_font = ThemeSettings::get_global(cx).ui_font.family.clone();
|
||||
|
||||
self.add_workspace_actions_listeners(div())
|
||||
self.actions(div())
|
||||
.key_context(context)
|
||||
.relative()
|
||||
.size_full()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue