mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
layout - reduce scope of workbench.secondarySideBar.forceMaximized to only apply when editors are closed (#291293)
* layout - reduce scope of `workbench.secondarySideBar.forceMaximized` to only apply when editors are closed We later need to revisit how a better layout would be for focus on sessions, but the current implementation has too many bugs. * Update src/vs/workbench/browser/workbench.contribution.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * . --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -354,12 +354,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
}
|
||||
};
|
||||
|
||||
// Maybe maximize auxiliary bar when no editors, sidebar hidden, and panel hidden
|
||||
// Maybe maximize auxiliary bar when no editors are visible
|
||||
const maybeMaximizeAuxiliaryBar = () => {
|
||||
if (
|
||||
this.mainPartEditorService.visibleEditors.length === 0 &&
|
||||
!this.isVisible(Parts.SIDEBAR_PART) &&
|
||||
!this.isVisible(Parts.PANEL_PART) &&
|
||||
this.configurationService.getValue(WorkbenchLayoutSettings.AUXILIARYBAR_FORCE_MAXIMIZED) === true
|
||||
) {
|
||||
this.setAuxiliaryBarMaximized(true);
|
||||
@@ -383,13 +381,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
}));
|
||||
this._register(this.editorGroupService.mainPart.onDidActivateGroup(showEditorIfHidden));
|
||||
|
||||
// Maybe maximize auxiliary bar when sidebar or panel hides
|
||||
this._register(this.onDidChangePartVisibility(({ partId, visible }) => {
|
||||
if (!visible && (partId === Parts.SIDEBAR_PART || partId === Parts.PANEL_PART)) {
|
||||
maybeMaximizeAuxiliaryBar();
|
||||
}
|
||||
}));
|
||||
|
||||
// Revalidate center layout when active editor changes: diff editor quits centered mode
|
||||
this._register(this.mainPartEditorService.onDidActiveEditorChange(() => this.centerMainEditorLayout(this.stateModel.getRuntimeValue(LayoutStateKeys.MAIN_EDITOR_CENTERED))));
|
||||
});
|
||||
|
||||
@@ -589,7 +589,7 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
|
||||
'type': 'boolean',
|
||||
'default': false,
|
||||
tags: ['experimental'],
|
||||
'description': localize('secondarySideBarForceMaximized', "Controls whether the secondary side bar is enforced to always show maximized unless other parts or editors are showing."),
|
||||
'description': localize('secondarySideBarForceMaximized', "Controls whether the secondary side bar is enforced to always show maximized on startup and when there are no open editors, in layouts that support a maximized secondary side bar."),
|
||||
},
|
||||
'workbench.secondarySideBar.showLabels': {
|
||||
'type': 'boolean',
|
||||
|
||||
Reference in New Issue
Block a user