提交 46698488 编写于 作者: S Sandeep Somavarapu

remove theming for severity icon

上级 0ed7ab83
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.severity-icon {
height: 16px;
width: 16px;
}
.severity-icon.warning {
background: url('status-warning.svg') center center no-repeat;
}
.severity-icon.error {
background: url('status-error.svg') center center no-repeat;
}
.severity-icon.info {
background: url('status-info.svg') center center no-repeat;
}
.vs-dark .severity-icon.warning {
background: url('status-warning-inverse.svg') center center no-repeat;
}
.vs-dark .severity-icon.error {
background: url('status-error-inverse.svg') center center no-repeat;
}
.vs-dark .severity-icon.info {
background: url('status-info-inverse.svg') center center no-repeat;
}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16" width="16"><circle cx="8" cy="8" r="6" fill="#1E1E1E"/><path d="M8 3C5.238 3 3 5.238 3 8s2.238 5 5 5 5-2.238 5-5-2.238-5-5-5zm3 7l-1 1-2-2-2 2-1-1 2-2.027L5 6l1-1 2 2 2-2 1 1-2 1.973L11 10z" fill="#F48771"/><path fill="#252526" d="M11 6l-1-1-2 2-2-2-1 1 2 1.973L5 10l1 1 2-2 2 2 1-1-2-2.027z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16" height="16" width="16"><circle cx="8" cy="8" r="6" fill="#F6F6F6"/><path d="M8 3C5.238 3 3 5.238 3 8s2.238 5 5 5 5-2.238 5-5-2.238-5-5-5zm3 7l-1 1-2-2-2 2-1-1 2-2.027L5 6l1-1 2 2 2-2 1 1-2 1.973L11 10z" fill="#E51400"/><path fill="#fff" d="M11 6l-1-1-2 2-2-2-1 1 2 1.973L5 10l1 1 2-2 2 2 1-1-2-2.027z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16" height="16" width="16"><circle cx="8.5" cy="7.5" r="5.5" fill="#1E1E1E"/><path d="M8.5 3C6.015 3 4 5.015 4 7.5S6.015 12 8.5 12 13 9.985 13 7.5 10.985 3 8.5 3zm.5 8H8V6h1v5zm0-6H8V4h1v1z" fill="#1BA1E2"/><path d="M8 6h1v5H8V6zm0-2v1h1V4H8z" fill="#252526"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16" height="16" width="16"><circle cx="8.5" cy="7.5" r="5.5" fill="#F6F6F6"/><path d="M8.5 3C6.015 3 4 5.015 4 7.5S6.015 12 8.5 12 13 9.985 13 7.5 10.985 3 8.5 3zm.5 8H8V6h1v5zm0-6H8V4h1v1z" fill="#1BA1E2"/><path d="M8 6h1v5H8V6zm0-2v1h1V4H8z" fill="#fff"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16" width="16"><path fill="#1E1E1E" d="M7.5 2L2 12l2 2h9l2-2L9.5 2z"/><path d="M9 3H8l-4.5 9 1 1h8l1-1L9 3zm0 9H8v-1h1v1zm0-2H8V6h1v4z" fill="#fc0"/><path d="M9 10H8V6h1v4zm0 1H8v1h1v-1z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16" height="16" width="16"><path fill="#F6F6F6" d="M7.5 2L2 12l2 2h9l2-2L9.5 2z"/><path d="M9 3H8l-4.5 9 1 1h8l1-1L9 3zm0 9H8v-1h1v1zm0-2H8V6h1v4z" fill="#fc0"/><path d="M9 10H8V6h1v4zm0 1H8v1h1v-1z"/></svg>
\ No newline at end of file
......@@ -5,7 +5,6 @@
import Severity from 'vs/base/common/severity';
import { registerThemingParticipant, ITheme, LIGHT } from 'vs/platform/theme/common/themeService';
import { editorErrorForeground, editorWarningForeground, editorInfoForeground, editorHintForeground } from 'vs/platform/theme/common/colorRegistry';
import { Color } from 'vs/base/common/color';
const errorStart = encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16" height="16" width="16"><circle cx="8" cy="8" r="6" fill="#F6F6F6"/><path d="M8 3C5.238 3 3 5.238 3 8s2.238 5 5 5 5-2.238 5-5-2.238-5-5-5zm3 7l-1 1-2-2-2 2-1-1 2-2.027L5 6l1-1 2 2 2-2 1 1-2 1.973L11 10z" fill="`);
......@@ -28,19 +27,19 @@ export namespace SeverityIcon {
export function getSVGData(severity: Severity, theme: ITheme): string {
switch (severity) {
case Severity.Ignore:
const ignoreColor = theme.getColor(editorHintForeground) || (theme.type === LIGHT ? Color.fromHex('#1BA1E2') : Color.fromHex('#1BA1E2'));
const ignoreColor = theme.type === LIGHT ? Color.fromHex('#1BA1E2') : Color.fromHex('#1BA1E2');
return theme.type === LIGHT ? infoStart + encodeURIComponent(ignoreColor.toString()) + infoEnd
: infoDarkStart + encodeURIComponent(ignoreColor.toString()) + infoDarkEnd;
case Severity.Info:
const infoColor = theme.getColor(editorInfoForeground) || (theme.type === LIGHT ? Color.fromHex('#1BA1E2') : Color.fromHex('#1BA1E2'));
const infoColor = theme.type === LIGHT ? Color.fromHex('#1BA1E2') : Color.fromHex('#1BA1E2');
return theme.type === LIGHT ? infoStart + encodeURIComponent(infoColor.toString()) + infoEnd
: infoDarkStart + encodeURIComponent(infoColor.toString()) + infoDarkEnd;
case Severity.Warning:
const warningColor = theme.getColor(editorWarningForeground) || (theme.type === LIGHT ? Color.fromHex('#fc0') : Color.fromHex('#fc0'));
const warningColor = theme.type === LIGHT ? Color.fromHex('#fc0') : Color.fromHex('#fc0');
return theme.type === LIGHT ? warningStart + encodeURIComponent(warningColor.toString()) + warningEnd
: warningDarkStart + encodeURIComponent(warningColor.toString()) + warningDarkEnd;
case Severity.Error:
const errorColor = theme.getColor(editorErrorForeground) || (theme.type === LIGHT ? Color.fromHex('#E51400') : Color.fromHex('#F48771'));
const errorColor = theme.type === LIGHT ? Color.fromHex('#E51400') : Color.fromHex('#F48771');
return theme.type === LIGHT ? errorStart + encodeURIComponent(errorColor.toString()) + errorEnd
: errorDarkStart + encodeURIComponent(errorColor.toString()) + errorDarkEnd;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册