mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 12:54:42 +00:00
add toggle right and bottom dock actions
This commit is contained in:
parent
aac83ceea7
commit
2457c55fe7
2 changed files with 10 additions and 0 deletions
|
@ -119,6 +119,8 @@ actions!(
|
|||
ActivateNextPane,
|
||||
FollowNextCollaborator,
|
||||
ToggleLeftDock,
|
||||
ToggleRightDock,
|
||||
ToggleBottomDock,
|
||||
NewTerminal,
|
||||
ToggleTerminalFocus,
|
||||
NewSearch,
|
||||
|
@ -250,6 +252,12 @@ pub fn init(app_state: Arc<AppState>, cx: &mut AppContext) {
|
|||
cx.add_action(|workspace: &mut Workspace, _: &ToggleLeftDock, cx| {
|
||||
workspace.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::activate_pane_at_index);
|
||||
|
||||
cx.add_action(|_: &mut Workspace, _: &install_cli::Install, cx| {
|
||||
|
|
|
@ -90,6 +90,8 @@ pub fn menus() -> Vec<Menu<'static>> {
|
|||
MenuItem::action("Reset Zoom", super::ResetBufferFontSize),
|
||||
MenuItem::separator(),
|
||||
MenuItem::action("Toggle Left Dock", workspace::ToggleLeftDock),
|
||||
MenuItem::action("Toggle Right Dock", workspace::ToggleRightDock),
|
||||
MenuItem::action("Toggle Bottom Dock", workspace::ToggleBottomDock),
|
||||
MenuItem::submenu(Menu {
|
||||
name: "Editor Layout",
|
||||
items: vec![
|
||||
|
|
Loading…
Reference in a new issue