Merge from vscode 70dc55955d586ebd427658b43cdb344f2047f9c2 (#6789)

This commit is contained in:
Anthony Dresser
2019-08-16 21:47:46 -07:00
committed by GitHub
parent fb26126bcb
commit 41d8663b09
79 changed files with 1815 additions and 572 deletions

View File

@@ -46,6 +46,9 @@ enum Settings {
PANEL_POSITION = 'workbench.panel.defaultLocation',
ZEN_MODE_RESTORE = 'zenMode.restore',
// TODO @misolori update this when finished
OCTICONS_UPDATE_ENABLED = 'workbench.octiconsUpdate.enabled',
}
enum Storage {
@@ -173,6 +176,11 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
wasSideBarVisible: false,
wasPanelVisible: false,
transitionDisposables: new DisposableStore()
},
// TODO @misolori update this when finished
octiconsUpdate: {
enabled: false
}
};
@@ -314,6 +322,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
const newMenubarVisibility = this.configurationService.getValue<MenuBarVisibility>(Settings.MENUBAR_VISIBLE);
this.setMenubarVisibility(newMenubarVisibility, !!skipLayout);
// TODO @misolori update this when finished
const newOcticonsUpdate = this.configurationService.getValue<boolean>(Settings.OCTICONS_UPDATE_ENABLED);
this.setOcticonsUpdate(newOcticonsUpdate);
}
private setSideBarPosition(position: Position): void {
@@ -426,6 +438,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
// Zen mode enablement
this.state.zenMode.restore = this.storageService.getBoolean(Storage.ZEN_MODE_ENABLED, StorageScope.WORKSPACE, false) && this.configurationService.getValue(Settings.ZEN_MODE_RESTORE);
// TODO @misolori update this when finished
this.state.octiconsUpdate.enabled = this.configurationService.getValue<boolean>(Settings.OCTICONS_UPDATE_ENABLED);
this.setOcticonsUpdate(this.state.octiconsUpdate.enabled);
}
private resolveEditorsToOpen(fileService: IFileService): Promise<IResourceEditor[]> | IResourceEditor[] {
@@ -729,6 +745,19 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
}
}
// TODO @misolori update this when finished
private setOcticonsUpdate(enabled: boolean): void {
this.state.octiconsUpdate.enabled = enabled;
// Update DOM
if (enabled) {
document.body.dataset.octiconsUpdate = 'enabled';
} else {
document.body.dataset.octiconsUpdate = '';
}
}
protected createWorkbenchLayout(instantiationService: IInstantiationService): void {
const titleBar = this.getPart(Parts.TITLEBAR_PART);
const editorPart = this.getPart(Parts.EDITOR_PART);