Skip to content

Commit ebc1d08

Browse files
committed
a small layout control menu
1 parent 1c77e85 commit ebc1d08

File tree

4 files changed

+6
-73
lines changed

4 files changed

+6
-73
lines changed

src/vs/workbench/browser/actions/layoutActions.ts

Lines changed: 5 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,7 @@ export class ToggleActivityBarVisibilityAction extends Action2 {
6363
id: MenuId.MenubarAppearanceMenu,
6464
group: '2_workbench_layout',
6565
order: 4
66-
}, {
67-
id: MenuId.LayoutControlMenu,
68-
group: '0_workbench_layout',
69-
order: 3
70-
}]
66+
}]
7167
});
7268
}
7369

@@ -103,11 +99,7 @@ registerAction2(class extends Action2 {
10399
id: MenuId.MenubarAppearanceMenu,
104100
group: '1_toggle_view',
105101
order: 3
106-
}, {
107-
id: MenuId.LayoutControlMenu,
108-
group: '9_quick_layout',
109-
order: 3
110-
}]
102+
}]
111103
});
112104
}
113105

@@ -209,16 +201,6 @@ MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
209201
order: 2
210202
});
211203

212-
MenuRegistry.appendMenuItem(MenuId.LayoutControlMenu, {
213-
group: '3_workbench_layout_move',
214-
command: {
215-
id: ToggleSidebarPositionAction.ID,
216-
title: localize({ key: 'miMoveSidebarRightNoMnemonic', comment: ['&& denotes a mnemonic'] }, "Move Side Bar Right")
217-
},
218-
when: ContextKeyExpr.notEquals('config.workbench.sideBar.location', 'right'),
219-
order: 2
220-
});
221-
222204
MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
223205
group: '3_workbench_layout_move',
224206
command: {
@@ -229,16 +211,6 @@ MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
229211
order: 2
230212
});
231213

232-
MenuRegistry.appendMenuItem(MenuId.LayoutControlMenu, {
233-
group: '3_workbench_layout_move',
234-
command: {
235-
id: ToggleSidebarPositionAction.ID,
236-
title: localize({ key: 'miMoveSidebarLeftNoMnemonic', comment: ['&& denotes a mnemonic'] }, "Move Side Bar Left")
237-
},
238-
when: ContextKeyExpr.equals('config.workbench.sideBar.location', 'right'),
239-
order: 2
240-
});
241-
242214
// --- Toggle Editor Visibility
243215

244216
registerAction2(class extends Action2 {
@@ -374,11 +346,7 @@ export class ToggleStatusbarVisibilityAction extends Action2 {
374346
id: MenuId.MenubarAppearanceMenu,
375347
group: '2_workbench_layout',
376348
order: 3
377-
}, {
378-
id: MenuId.LayoutControlMenu,
379-
group: '0_workbench_layout',
380-
order: 1
381-
}]
349+
}]
382350
});
383351
}
384352

@@ -450,12 +418,7 @@ registerAction2(class extends Action2 {
450418
id: MenuId.MenubarAppearanceMenu,
451419
group: '1_toggle_view',
452420
order: 2
453-
}, {
454-
id: MenuId.LayoutControlMenu,
455-
group: '9_quick_layout',
456-
order: 2
457-
}
458-
]
421+
}]
459422
});
460423
}
461424

@@ -495,11 +458,7 @@ if (isWindows || isLinux || isWeb) {
495458
id: MenuId.MenubarAppearanceMenu,
496459
group: '2_workbench_layout',
497460
order: 0
498-
}, {
499-
id: MenuId.LayoutControlMenu,
500-
group: '0_workbench_layout',
501-
order: -1
502-
}]
461+
}]
503462
});
504463
}
505464

src/vs/workbench/browser/actions/windowActions.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,7 @@ class ToggleFullScreenAction extends Action2 {
300300
id: MenuId.MenubarAppearanceMenu,
301301
group: '1_toggle_view',
302302
order: 1
303-
}, {
304-
id: MenuId.LayoutControlMenu,
305-
group: '9_quick_layout',
306-
order: 1
307-
}]
303+
}]
308304
});
309305
}
310306

src/vs/workbench/browser/parts/editor/editor.contribution.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -574,13 +574,6 @@ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
574574
order: 2
575575
});
576576

577-
MenuRegistry.appendMenuItem(MenuId.LayoutControlMenu, {
578-
group: '9_quick_layout',
579-
title: localize({ key: 'miEditorLayoutLayoutControl', comment: ['&& denotes a mnemonic'] }, "Editor Layout"),
580-
submenu: MenuId.MenubarLayoutMenu,
581-
order: 0
582-
});
583-
584577
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
585578
group: '1_split',
586579
command: {

src/vs/workbench/browser/parts/panel/panelActions.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -365,21 +365,6 @@ MenuRegistry.appendMenuItems([
365365
}
366366
]);
367367

368-
MenuRegistry.appendMenuItem(MenuId.LayoutControlMenu, {
369-
title: localize('miMovePanel', "Move Panel"),
370-
submenu: MenuId.LayoutControlPanelPositionMenu,
371-
group: '3_workbench_layout_move',
372-
order: 5
373-
});
374-
375-
MenuRegistry.appendMenuItem(MenuId.LayoutControlMenu, {
376-
title: localize('miAlignPanel', "Align Panel"),
377-
submenu: MenuId.LayoutControlPanelAlignmentMenu,
378-
group: '3_workbench_layout_move',
379-
order: 6,
380-
when: PanelPositionContext.isEqualTo(positionToString(Position.BOTTOM))
381-
});
382-
383368
function registerPanelActionById(config: PanelActionConfig<PanelAlignment | Position>, descriptor: SyncActionDescriptor, parentMenu: MenuId) {
384369
const { id, label, shortLabel, alias, when } = config;
385370
// register the workbench action

0 commit comments

Comments
 (0)