Skip to content

Commit

Permalink
Auto merge of rust-lang#12388 - Veykril:statusitem, r=Veykril
Browse files Browse the repository at this point in the history
internal: Make use of the statusBarItem colors in VSCode

Fixes rust-lang/rust-analyzer#7736
  • Loading branch information
bors committed May 26, 2022
2 parents 5b69a34 + 02c2377 commit 92f3630
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions editors/code/src/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,19 @@ export class Ctx {
case "warning":
this.statusBar.tooltip += "\nClick to reload.";
this.statusBar.command = "rust-analyzer.reloadWorkspace";
this.statusBar.color = new vscode.ThemeColor("notificationsWarningIcon.foreground");
this.statusBar.color = new vscode.ThemeColor("statusBarItem.warningForeground");
this.statusBar.backgroundColor = new vscode.ThemeColor(
"statusBarItem.warningBackground"
);
icon = "$(warning) ";
break;
case "error":
this.statusBar.tooltip += "\nClick to reload.";
this.statusBar.command = "rust-analyzer.reloadWorkspace";
this.statusBar.color = new vscode.ThemeColor("notificationsErrorIcon.foreground");
this.statusBar.color = new vscode.ThemeColor("statusBarItem.errorForeground");
this.statusBar.backgroundColor = new vscode.ThemeColor(
"statusBarItem.errorBackground"
);
icon = "$(error) ";
break;
}
Expand Down

0 comments on commit 92f3630

Please sign in to comment.