提交 6019724a 编写于 作者: M Martin Aeschlimann

Cannot Theme the 'No Definition Found' Popup. Fixes #25579

上级 2fba3e68
......@@ -25,8 +25,6 @@
.monaco-editor .monaco-editor-overlaymessage .message {
padding: 1px 4px;
background: #1382CE;
color: white;
}
.monaco-editor .monaco-editor-overlaymessage .anchor {
......@@ -36,6 +34,5 @@
border-style: solid;
z-index: 1000;
border-width: 8px;
border-top-color: #1382CE;
position: absolute;
}
......@@ -17,6 +17,8 @@ import { commonEditorContribution, CommonEditorRegistry, EditorCommand } from 'v
import { ICodeEditor, IContentWidget, IContentWidgetPosition, ContentWidgetPositionPreference } from 'vs/editor/browser/editorBrowser';
import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { IPosition } from 'vs/editor/common/core/position';
import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService';
import { inputValidationInfoBorder, inputValidationInfoBackground } from 'vs/platform/theme/common/colorRegistry';
@commonEditorContribution
export class MessageController {
......@@ -170,3 +172,16 @@ class MessageWidget implements IContentWidget {
return { position: this._position, preference: [ContentWidgetPositionPreference.ABOVE] };
}
}
registerThemingParticipant((theme, collector) => {
let border = theme.getColor(inputValidationInfoBorder);
if (border) {
let borderWidth = theme.type === HIGH_CONTRAST ? 2 : 1;
collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: ${border}; }`);
collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${borderWidth}px solid ${border}; }`);
}
let background = theme.getColor(inputValidationInfoBackground);
if (background) {
collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${background}; }`);
}
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册