提交 47494657 编写于 作者: E Eric Amodio

Supports view progress in merged header & panel

上级 bee8e036
......@@ -3,9 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-workbench .sidebar > .content {
/* Removed to allow progress bar positioning to escape */
/* .monaco-workbench .sidebar > .content {
overflow: hidden;
}
} */
.monaco-workbench.nosidebar > .part.sidebar {
display: none !important;
......
......@@ -28,10 +28,14 @@
margin-left: 7px;
}
.monaco-pane-view .pane > .pane-header .monaco-progress-container {
.monaco-pane-view .pane .monaco-progress-container {
position: absolute;
left: 0;
bottom: 0;
top: -2px;
z-index: 5;
height: 2px;
}
.monaco-pane-view .pane:not(.merged-header) .monaco-progress-container {
top: 20px;
}
......@@ -225,6 +225,15 @@ export abstract class ViewPane extends Pane implements IView {
this.viewWelcomeController = new ViewWelcomeController(this.id, contextKeyService);
}
get headerVisible(): boolean {
return super.headerVisible;
}
set headerVisible(visible: boolean) {
super.headerVisible = visible;
toggleClass(this.element, 'merged-header', !visible);
}
setVisible(visible: boolean): void {
if (this._isVisible !== visible) {
this._isVisible = visible;
......@@ -294,13 +303,6 @@ export abstract class ViewPane extends Pane implements IView {
const onDidRelevantConfigurationChange = Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration(ViewPane.AlwaysShowActionsConfig));
this._register(onDidRelevantConfigurationChange(this.updateActionsVisibility, this));
this.updateActionsVisibility();
if (this.progressBar !== undefined) {
// Progress bar
this.progressBar = this._register(new ProgressBar(this.headerContainer));
this._register(attachProgressBarStyler(this.progressBar, this.themeService));
this.progressBar.hide();
}
}
protected renderTwisties(container: HTMLElement): void {
......@@ -333,13 +335,9 @@ export abstract class ViewPane extends Pane implements IView {
}
getProgressIndicator() {
if (!this.headerContainer) {
return undefined;
}
if (this.progressBar === undefined) {
// Progress bar
this.progressBar = this._register(new ProgressBar(this.headerContainer));
this.progressBar = this._register(new ProgressBar(this.element));
this._register(attachProgressBarStyler(this.progressBar, this.themeService));
this.progressBar.hide();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册