mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Merge from vscode 79a1f5a5ca0c6c53db617aa1fa5a2396d2caebe2
This commit is contained in:
@@ -44,6 +44,7 @@ import { LineNumbersType } from 'vs/editor/common/config/editorOptions';
|
||||
import { ActivitybarPart } from 'vs/workbench/browser/parts/activitybar/activitybarPart';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IViewDescriptorService, ViewContainerLocation } from 'vs/workbench/common/views';
|
||||
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
|
||||
|
||||
export enum Settings {
|
||||
ACTIVITYBAR_VISIBLE = 'workbench.activityBar.visible',
|
||||
@@ -178,6 +179,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
private notificationService!: INotificationService;
|
||||
private themeService!: IThemeService;
|
||||
private activityBarService!: IActivityBarService;
|
||||
private statusBarService!: IStatusbarService;
|
||||
|
||||
protected readonly state = {
|
||||
fullscreen: false,
|
||||
@@ -262,7 +264,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
this.titleService = accessor.get(ITitleService);
|
||||
this.notificationService = accessor.get(INotificationService);
|
||||
this.activityBarService = accessor.get(IActivityBarService);
|
||||
accessor.get(IStatusbarService); // not used, but called to ensure instantiated
|
||||
this.statusBarService = accessor.get(IStatusbarService);
|
||||
|
||||
// Listeners
|
||||
this.registerLayoutListeners();
|
||||
@@ -397,6 +399,8 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
const newMenubarVisibility = getMenuBarVisibility(this.configurationService, this.environmentService);
|
||||
this.setMenubarVisibility(newMenubarVisibility, !!skipLayout);
|
||||
|
||||
// Centered Layout
|
||||
this.centerEditorLayout(this.state.editor.centered, skipLayout);
|
||||
}
|
||||
|
||||
private setSideBarPosition(position: Position): void {
|
||||
@@ -850,8 +854,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
case Parts.ACTIVITYBAR_PART:
|
||||
this.activityBarService.focusActivityBar();
|
||||
break;
|
||||
case Parts.STATUSBAR_PART:
|
||||
this.statusBarService.focus();
|
||||
default:
|
||||
// Status Bar, Activity Bar and Title Bar simply pass focus to container
|
||||
// Title Bar simply pass focus to container
|
||||
const container = this.getContainer(part);
|
||||
if (container) {
|
||||
container.focus();
|
||||
@@ -1205,9 +1211,18 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
|
||||
let smartActive = active;
|
||||
const activeEditor = this.editorService.activeEditor;
|
||||
if (this.configurationService.getValue('workbench.editor.centeredLayoutAutoResize')
|
||||
&& (this.editorGroupService.groups.length > 1 || (activeEditor && activeEditor instanceof SideBySideEditorInput))) {
|
||||
smartActive = false; // Respect the auto resize setting - do not go into centered layout if there is more than 1 group.
|
||||
|
||||
const isSideBySideLayout = activeEditor
|
||||
&& activeEditor instanceof SideBySideEditorInput
|
||||
// DiffEditorInput inherits from SideBySideEditorInput but can still be functionally an inline editor.
|
||||
&& (!(activeEditor instanceof DiffEditorInput) || this.configurationService.getValue('diffEditor.renderSideBySide'));
|
||||
|
||||
const isCenteredLayoutAutoResizing = this.configurationService.getValue('workbench.editor.centeredLayoutAutoResize');
|
||||
if (
|
||||
isCenteredLayoutAutoResizing
|
||||
&& (this.editorGroupService.groups.length > 1 || isSideBySideLayout)
|
||||
) {
|
||||
smartActive = false;
|
||||
}
|
||||
|
||||
// Enter Centered Editor Layout
|
||||
|
||||
Reference in New Issue
Block a user