Skip to content

Commit

Permalink
#113757 show sidebar actions also on view title context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Jan 8, 2021
1 parent e4dc7b4 commit 35766c6
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/vs/workbench/browser/actions/layoutActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,17 @@ MenuRegistry.appendMenuItems([{
when: ContextKeyExpr.notEquals('config.workbench.sideBar.location', 'right'),
order: 1
}
}, {
id: MenuId.ViewTitleContext,
item: {
group: '3_workbench_layout_move',
command: {
id: ToggleSidebarPositionAction.ID,
title: nls.localize('move sidebar right', "Move Side Bar Right")
},
when: ContextKeyExpr.notEquals('config.workbench.sideBar.location', 'right'),
order: 1
}
}, {
id: MenuId.ViewContainerTitleContext,
item: {
Expand All @@ -187,6 +198,17 @@ MenuRegistry.appendMenuItems([{
when: ContextKeyExpr.equals('config.workbench.sideBar.location', 'right'),
order: 1
}
}, {
id: MenuId.ViewTitleContext,
item: {
group: '3_workbench_layout_move',
command: {
id: ToggleSidebarPositionAction.ID,
title: nls.localize('move sidebar left', "Move Side Bar Left")
},
when: ContextKeyExpr.equals('config.workbench.sideBar.location', 'right'),
order: 1
}
}]);

MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
Expand Down Expand Up @@ -277,6 +299,17 @@ MenuRegistry.appendMenuItems([{
when: SideBarVisibleContext,
order: 2
}
}, {
id: MenuId.ViewTitleContext,
item: {
group: '3_workbench_layout_move',
command: {
id: TOGGLE_SIDEBAR_VISIBILITY_ACTION_ID,
title: nls.localize('compositePart.hideSideBarLabel', "Hide Side Bar"),
},
when: SideBarVisibleContext,
order: 2
}
}]);

MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
Expand Down

0 comments on commit 35766c6

Please sign in to comment.