mirror of
https://github.com/Microsoft/vscode
synced 2024-08-26 20:39:37 +00:00
status - simplify by not needing element ID
This commit is contained in:
parent
a429fd1356
commit
959246744b
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue