Skip to content

Commit 69ec81b

Browse files
committed
Revert "remove status icons and adopt octicons"
This reverts commit d0e1fe5.
1 parent d0e1fe5 commit 69ec81b

11 files changed

Lines changed: 57 additions & 17 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
.severity-icon {
7+
height: 16px;
8+
width: 16px;
9+
}
10+
11+
.severity-icon.warning {
12+
background: url('status-warning.svg') center center no-repeat;
13+
}
14+
15+
.severity-icon.error {
16+
background: url('status-error.svg') center center no-repeat;
17+
}
18+
19+
.severity-icon.info {
20+
background: url('status-info.svg') center center no-repeat;
21+
}
22+
23+
.vs-dark .severity-icon.warning {
24+
background: url('status-warning-inverse.svg') center center no-repeat;
25+
}
26+
27+
.vs-dark .severity-icon.error {
28+
background: url('status-error-inverse.svg') center center no-repeat;
29+
}
30+
31+
.vs-dark .severity-icon.info {
32+
background: url('status-info-inverse.svg') center center no-repeat;
33+
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

src/vs/base/browser/ui/severityIcon/severityIcon.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import 'vs/css!./media/severityIcon';
67
import { Disposable } from 'vs/base/common/lifecycle';
78
import Severity from 'vs/base/common/severity';
89
import * as DOM from 'vs/base/browser/dom';
@@ -25,21 +26,21 @@ export class SeverityIcon extends Disposable {
2526
}
2627

2728
style({ color }: {
28-
color?: Color | null
29+
color: Color
2930
}): void {
30-
this.element.style.color = color ? color.toString() : '';
31+
this.element.style.color = color.toString();
3132
}
3233

3334
private iconClassNameFor(severity: Severity): string {
3435
switch (severity) {
3536
case Severity.Ignore:
36-
return 'severity-icon octicon octicon-info';
37+
return 'octicon octicon-info';
3738
case Severity.Info:
38-
return 'severity-icon octicon octicon-info';
39+
return 'octicon octicon-info';
3940
case Severity.Warning:
40-
return 'severity-icon octicon octicon-warning';
41+
return 'octicon octicon-warning';
4142
case Severity.Error:
42-
return 'severity-icon octicon octicon-error';
43+
return 'octicon octicon-error';
4344
}
4445
return '';
4546
}

src/vs/editor/contrib/gotoError/gotoErrorWidget.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,10 @@ export class MarkerNavigationWidget extends PeekViewWidget {
199199
} else if (this._severity === MarkerSeverity.Info) {
200200
colorId = editorMarkerNavigationInfo;
201201
}
202-
const severityColor = theme.getColor(colorId);
203-
this._headingSeverityIcon.style({ color: severityColor });
202+
const frameColor = theme.getColor(colorId);
204203
this.style({
205-
arrowColor: severityColor,
206-
frameColor: severityColor,
204+
arrowColor: frameColor,
205+
frameColor: frameColor,
207206
headerBackgroundColor: this._backgroundColor,
208207
primaryHeadingColor: theme.getColor(peekViewTitleForeground),
209208
secondaryHeadingColor: theme.getColor(peekViewTitleInfoForeground)

src/vs/editor/contrib/gotoError/media/gotoErrorWidget.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
/* marker zone */
77

88
.monaco-editor .peekview-widget .head .peekview-title .severity-icon {
9+
display: inline-block;
10+
vertical-align: text-top;
911
margin-right: 4px;
10-
font-size: 12px;
1112
}
1213

1314
.monaco-editor .marker-widget {

0 commit comments

Comments
 (0)