提交 af0bb1b9 编写于 作者: J Johannes Rieken

special handling for status bar part

上级 bedb3b53
......@@ -99,6 +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';
/**
* Services that we require for the Shell
......@@ -551,15 +552,21 @@ export class WorkbenchShell extends Disposable {
// capture html-structure
let html = '<div id="monaco-parts-splash">';
let parts = this.container.querySelectorAll('.part');
for (let i = 0; i < parts.length; i++) {
let part = parts.item(i) as HTMLElement;
let pos = getDomNodePagePosition(part);
let { backgroundColor } = window.getComputedStyle(part);
html += `<div style="position: absolute; top: ${pos.top}px; left: ${pos.left}px; height: ${pos.height}px; width: ${pos.width}px; background-color: ${backgroundColor};"></div>`;
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<div style="position: absolute; background-color: ${bg}; height:${pos.height}px; width:${pos.width}px; bottom:0; left:${pos.left}px;"></div>`;
} else {
html += `\n<div style="position: absolute; background-color: ${bg}; height:${pos.height}px; width:${pos.width}px; top:${pos.top}px; left:${pos.left}px;"></div>`;
}
}
html += '</div>';
html += '\n</div>';
// store per workspace or globally
let state = this.contextService.getWorkbenchState();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册