提交 0e68a1a1 编写于 作者: J Jackson Kearl

Changes for feedback

上级 dddb7aa6
......@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-panel-view .panel > .panel-header > h3.title {
.monaco-panel-view .panel > .panel-header h3.title {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
......
......@@ -100,7 +100,7 @@ export abstract class ViewletPanel extends Panel implements IView {
protected renderHeader(container: HTMLElement): void {
this.headerContainer = container;
this.renderHeaderTitle(container, [], [this.title]);
this.renderHeaderTitle(container, this.title);
const actions = append(container, $('.actions'));
this.toolbar = new ToolBar(actions, this.contextMenuService, {
......@@ -119,8 +119,8 @@ export abstract class ViewletPanel extends Panel implements IView {
this.updateActionsVisibility();
}
protected renderHeaderTitle(container: HTMLElement, classList: string[], children: (string | Node)[]): void {
append(container, $('h3.' + ['title', ...classList].join('.'), null, ...children));
protected renderHeaderTitle(container: HTMLElement, title: string): void {
append(container, $('h3.title', null, title));
}
focus(): void {
......
......@@ -88,13 +88,12 @@ export class CallStackView extends TreeViewsViewletPanel {
}
protected renderHeaderTitle(container: HTMLElement): void {
const name = $('span');
name.textContent = this.options.title;
this.pauseMessage = $('span.pause-message');
let titleContainer = dom.append(container, $('.debug-call-stack-title'));
super.renderHeaderTitle(titleContainer, this.options.title);
this.pauseMessage = dom.append(titleContainer, $('span.pause-message'));
this.pauseMessage.hidden = true;
this.pauseMessageLabel = dom.append(this.pauseMessage, $('span.label'));
super.renderHeaderTitle(container, ['debug-call-stack-title'], [name, this.pauseMessage]);
}
public renderBody(container: HTMLElement): void {
......
......@@ -72,13 +72,11 @@ export class ExtensionsListView extends ViewletPanel {
}
renderHeaderTitle(container: HTMLElement): void {
let title = $('span');
title.textContent = this.options.title;
super.renderHeaderTitle(container, this.options.title);
this.badgeContainer = $('.count-badge-wrapper');
this.badgeContainer = append(container, $('.count-badge-wrapper'));
this.badge = new CountBadge(this.badgeContainer);
this.disposables.push(attachBadgeStyler(this.badge, this.themeService));
super.renderHeaderTitle(container, [], [title, this.badgeContainer]);
}
renderBody(container: HTMLElement): void {
......
......@@ -176,9 +176,9 @@ export class OpenEditorsView extends ViewletPanel {
}
protected renderHeaderTitle(container: HTMLElement): void {
super.renderHeaderTitle(container, this.title);
const title = $('span', null, this.title);
const count = $('.count');
const count = dom.append(container, $('.count'));
this.dirtyCountElement = dom.append(count, $('.monaco-count-badge'));
this.disposables.push((attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, contrastBorder }, colors => {
......@@ -195,7 +195,6 @@ export class OpenEditorsView extends ViewletPanel {
})));
this.updateDirtyIndicator();
super.renderHeaderTitle(container, [], [title, count]);
}
public renderBody(container: HTMLElement): void {
......
......@@ -51,7 +51,7 @@
display: none;
}
.scm-viewlet .scm-provider > .name > .type {
.scm-viewlet .scm-provider > .type {
opacity: 0.7;
margin-left: 0.5em;
font-size: 0.9em;
......
......@@ -765,22 +765,22 @@ export class RepositoryPanel extends ViewletPanel {
}
protected renderHeaderTitle(container: HTMLElement): void {
const name = $('.name');
const title = append(name, $('span.title'));
const type = append(name, $('span.type'));
let title: string;
let type: string;
if (this.repository.provider.rootUri) {
title.textContent = basename(this.repository.provider.rootUri.fsPath);
type.textContent = this.repository.provider.label;
title = basename(this.repository.provider.rootUri.fsPath);
type = this.repository.provider.label;
} else {
title.textContent = this.repository.provider.label;
type.textContent = '';
title = this.repository.provider.label;
type = '';
}
super.renderHeaderTitle(container, title);
addClass(container, 'scm-provider');
append(container, $('span.type', null, type));
const onContextMenu = mapEvent(stop(domEvent(container, 'contextmenu')), e => new StandardMouseEvent(e));
onContextMenu(this.onContextMenu, this, this.disposables);
super.renderHeaderTitle(container, ['scm-provider'], [name]);
}
private onContextMenu(event: StandardMouseEvent): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册