提交 eb9f03c4 编写于 作者: M Michel Kaporin

Polished exception widget.

上级 87eed209
......@@ -6,6 +6,7 @@
import 'vs/css!../browser/media/exceptionWidget';
import * as nls from 'vs/nls';
import * as dom from 'vs/base/browser/dom';
import strings = require('vs/base/common/strings');
import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/browser/zoneWidget';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
......@@ -27,7 +28,7 @@ export class ExceptionWidget extends ZoneWidget {
this.setCssClass('exception-widget');
let title = $('.title');
title.textContent = nls.localize('exceptionThrown', 'Exception occured.');
title.textContent = nls.localize('exceptionThrown', 'Exception occured');
dom.append(container, title);
const thread = this.debugService.getViewModel().focusedThread;
......@@ -37,4 +38,9 @@ export class ExceptionWidget extends ZoneWidget {
dom.append(container, msg);
}
}
protected _doLayout(heightInPixel: number, widthInPixel: number): void {
const fontSize = this.editor.getConfiguration().fontInfo.fontSize;
this.container.style.height = strings.format('{0}px', fontSize / 0.4);
}
}
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
.monaco-editor .zone-widget .zone-widget-container.exception-widget {
padding: 8px;
font-family: Monaco, Menlo, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";
padding: 8px 10px;
}
.monaco-editor .zone-widget .zone-widget-container.exception-widget .title {
font-weight: bold;
font-family: Monaco, Menlo, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";
}
.monaco-editor .zone-widget-arrow.below.exception-widget {
......@@ -19,7 +19,7 @@
/* Light and Dark Theming */
.monaco-editor .zone-widget .zone-widget-container.exception-widget {
background-color: rgba(163, 21, 21, 0.25);
background-color: rgba(163, 21, 21, 0.05);
border-top-color: rgb(163, 21, 21);
border-bottom-color: rgb(163, 21, 21);
}
......
......@@ -332,7 +332,7 @@ export class DebugEditorContribution implements IDebugEditorContribution {
}
this.exceptionWidget = this.instantiationService.createInstance(ExceptionWidget, this.editor, lineNumber);
this.exceptionWidget.show({ lineNumber, column }, 3);
this.exceptionWidget.show({ lineNumber, column }, 3.5);
}
private closeExceptionWidget(): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册