diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 9c75d474a8af812ccaa2cb410538d1f703905d34..0c9fc1a8b371df49ae881703cef238f21ada496f 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -84,12 +84,14 @@ function readFile(file) { function showPartsSplash(configuration) { let key; + let keep = false; if (configuration.folderPath) { key = `storage://workspace/${configuration.folderPath.replace(/^\//, '')}/parts-splash`; } else if (configuration.workspace) { key = `storage://workspace/root:${configuration.workspace.id}/parts-splash`; } else { key = `storage://global/parts-splash`; + keep = true; } let structure = window.localStorage.getItem(key); @@ -97,6 +99,8 @@ function showPartsSplash(configuration) { let splash = document.createElement('div'); splash.innerHTML = structure; document.body.appendChild(splash); + } + if (!keep) { window.localStorage.removeItem(key); } } diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 1273977944a2a1551644add463544d0bf5cbb9ed..a89de640768aebcd5a8684421f6fb263ab328b2e 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -99,7 +99,7 @@ import { OpenerService } from 'vs/editor/browser/services/openerService'; import { SearchHistoryService } from 'vs/workbench/services/search/node/searchHistoryService'; import { MulitExtensionManagementService } from 'vs/platform/extensionManagement/common/multiExtensionManagement'; import { ExtensionManagementServerService } from 'vs/workbench/services/extensions/node/extensionManagementServerService'; -import { Parts } from 'vs/workbench/services/part/common/partService'; +import { Parts, Position } from 'vs/workbench/services/part/common/partService'; /** * Services that we require for the Shell @@ -552,20 +552,35 @@ export class WorkbenchShell extends Disposable { // capture html-structure let html = '
'; - let parts = [Parts.ACTIVITYBAR_PART, Parts.EDITOR_PART, Parts.MENUBAR_PART, Parts.PANEL_PART, Parts.SIDEBAR_PART, Parts.STATUSBAR_PART, Parts.TITLEBAR_PART]; - for (const part of parts) { - let container = this.workbench.getContainer(part); - let pos = getDomNodePagePosition(container); - let bg = container.style.backgroundColor || 'inhert'; - - if (part === Parts.STATUSBAR_PART) { - // status bar get special treatment because we want to - // be at the bottom on the page - html += `\n
`; - } else { - html += `\n
`; - } + + // activitybar-part + let left = this.workbench.getSideBarPosition() === Position.LEFT; + let activityPartWidth: number; + { + let part = this.workbench.getContainer(Parts.ACTIVITYBAR_PART); + let pos = getDomNodePagePosition(part); + let bg = part.style.backgroundColor || 'inhert'; + html += `
`; + activityPartWidth = pos.width; + } + + // sidebar-part + { + let part = this.workbench.getContainer(Parts.SIDEBAR_PART); + let pos = getDomNodePagePosition(part); + let bg = part.style.backgroundColor || 'inhert'; + html += `
`; } + + // statusbar-part + { + let part = this.workbench.getContainer(Parts.STATUSBAR_PART); + let pos = getDomNodePagePosition(part); + let bg = part.style.backgroundColor || 'inhert'; + + html += `
`; + } + html += '\n
'; // store per workspace or globally