提交 2dd809dc 编写于 作者: J Johannes Rieken

don't save parts layout when developing extensions, #55959

上级 1026e5fb
......@@ -20,6 +20,7 @@ import { DEFAULT_EDITOR_MIN_DIMENSIONS } from 'vs/workbench/browser/parts/editor
import { Extensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
import * as themes from 'vs/workbench/common/theme';
import { IPartService, Parts, Position } from 'vs/workbench/services/part/common/partService';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
class PartsSplash {
......@@ -34,6 +35,7 @@ class PartsSplash {
@IThemeService private readonly _themeService: IThemeService,
@IPartService private readonly _partService: IPartService,
@IStorageService private readonly _storageService: IStorageService,
@IEnvironmentService private readonly _envService: IEnvironmentService,
@ILifecycleService lifecycleService: ILifecycleService,
@IBroadcastService private broadcastService: IBroadcastService
) {
......@@ -59,7 +61,7 @@ class PartsSplash {
statusBarBackground: this._getThemeColor(themes.STATUS_BAR_BACKGROUND),
statusBarNoFolderBackground: this._getThemeColor(themes.STATUS_BAR_NO_FOLDER_BACKGROUND),
};
const layoutInfo = isFullscreen() ? undefined : {
const layoutInfo = !this._shouldSaveLayoutInfo() ? undefined : {
sideBarSide: this._partService.getSideBarPosition() === Position.RIGHT ? 'right' : 'left',
editorPartMinWidth: DEFAULT_EDITOR_MIN_DIMENSIONS.width,
titleBarHeight: getTotalHeight(this._partService.getContainer(Parts.TITLEBAR_PART)),
......@@ -91,6 +93,10 @@ class PartsSplash {
return color ? color.toString() : undefined;
}
private _shouldSaveLayoutInfo(): boolean {
return !isFullscreen() && !this._envService.isExtensionDevelopment;
}
private _removePartsSplash(): void {
let element = document.getElementById(PartsSplash._splashElementId);
if (element) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册