提交 1c0b640a 编写于 作者: C Christof Marti

Collapse deployment view

上级 742829cd
...@@ -47,6 +47,7 @@ export class DeploymentView extends CollapsibleView { ...@@ -47,6 +47,7 @@ export class DeploymentView extends CollapsibleView {
public static ID: string = 'workbench.deploymentView'; public static ID: string = 'workbench.deploymentView';
public static NAME = nls.localize('deployment', "Deployment"); public static NAME = nls.localize('deployment', "Deployment");
public static HEADER_HEIGHT = 22;
public static HEIGHT = 80; public static HEIGHT = 80;
private deploymentLink: HTMLAnchorElement; private deploymentLink: HTMLAnchorElement;
......
...@@ -333,6 +333,7 @@ export class SCMViewlet extends Viewlet { ...@@ -333,6 +333,7 @@ export class SCMViewlet extends Viewlet {
}; };
this.deploymentSplitView = new SplitView(root); this.deploymentSplitView = new SplitView(root);
const view = this.instantiationService.createInstance(DeploymentView, options); const view = this.instantiationService.createInstance(DeploymentView, options);
this.disposables.push(view.addListener('change', () => this.layout()));
this.deploymentSplitView.addView(view); this.deploymentSplitView.addView(view);
this.disposables.push(this.deploymentSplitView); this.disposables.push(this.deploymentSplitView);
...@@ -410,7 +411,7 @@ export class SCMViewlet extends Viewlet { ...@@ -410,7 +411,7 @@ export class SCMViewlet extends Viewlet {
this.inputBox.layout(); this.inputBox.layout();
const editorHeight = this.inputBox.height; const editorHeight = this.inputBox.height;
const deploymentHeight = this.activeProvider && this.activeProvider.id === 'git' ? DeploymentView.HEIGHT : 0; const deploymentHeight = this.activeProvider && this.activeProvider.id === 'git' ? (this.deploymentSplitView.getViews<DeploymentView>()[0].isExpanded() ? DeploymentView.HEIGHT : DeploymentView.HEADER_HEIGHT) : 0;
const listHeight = dimension.height - (editorHeight + 12 /* margin */) - deploymentHeight; const listHeight = dimension.height - (editorHeight + 12 /* margin */) - deploymentHeight;
this.listContainer.style.height = `${listHeight}px`; this.listContainer.style.height = `${listHeight}px`;
this.list.layout(listHeight); this.list.layout(listHeight);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册