提交 95924674 编写于 作者: B Benjamin Pasero

status - simplify by not needing element ID

上级 a429fd13
......@@ -60,11 +60,6 @@ export interface IStatusbarEntry {
* Wether to show a beak above the status bar entry.
*/
readonly showBeak?: boolean;
/**
* An identifier to associate with the status bar entry DOM element.
*/
readonly elementId?: string;
}
export interface IStatusbarService {
......
......@@ -324,13 +324,6 @@ class StatusBarEntryItem extends Disposable {
private render(entry: IStatusbarEntry): void {
// Container
if (entry.elementId) {
this.container.id = entry.elementId;
} else if (this.container.id) {
delete this.container.id;
}
// Text Container
let textContainer: HTMLElement;
if (entry.command) {
......
......@@ -128,7 +128,6 @@ export class TaskStatusBarContributions extends Disposable implements IWorkbench
const problems = this.markerService.getStatistics();
return {
elementId: 'task-statusbar-item',
text: this.getProblemsText(problems),
tooltip: this.getProblemsTooltip(problems),
command: 'workbench.action.tasks.toggleProblems'
......
......@@ -214,7 +214,7 @@ class WelcomeOverlay extends Disposable {
}
private updateProblemsKey() {
const problems = document.getElementById('task-statusbar-item');
const problems = document.querySelector('div[id="workbench.parts.statusbar"] .statusbar-item.left .octicon.octicon-warning');
const key = this._overlay.querySelector('.key.problems') as HTMLElement;
if (problems instanceof HTMLElement) {
const target = problems.getBoundingClientRect();
......
......@@ -48,7 +48,7 @@ export class StatusBar {
case StatusBarElement.SYNC_STATUS:
return `${this.mainSelector} ${this.leftSelector} .octicon.octicon-sync`;
case StatusBarElement.PROBLEMS_STATUS:
return `${this.mainSelector} ${this.leftSelector} div[id="task-statusbar-item"]`;
return `${this.mainSelector} ${this.leftSelector} .octicon.octicon-error`;
case StatusBarElement.SELECTION_STATUS:
return `${this.mainSelector} ${this.rightSelector} .editor-status-selection`;
case StatusBarElement.INDENTATION_STATUS:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册