Browse Source

ui changes

cl-refactor
yann300 10 years ago
parent
commit
2d7fc88e7c
  1. 6
      mix/qml/html/cm/errorannotation.js
  2. 5
      mix/qml/html/cm/solarized.css

6
mix/qml/html/cm/errorannotation.js

@ -3,7 +3,7 @@ function ErrorAnnotation(editor, line, column, content)
this.opened = false;
this.line = line;
this.column = column;
this.content = content;
this.content = content.replace("Contract Error:", "");
this.editor = editor;
this.errorMark = null;
this.lineWidget = null;
@ -13,7 +13,7 @@ function ErrorAnnotation(editor, line, column, content)
ErrorAnnotation.prototype.init = function()
{
var separators = [' ', '\\\+', '-', ';', '\\\(', '\\\{', '\\\}', '\\\)', '\\*', '/', ':', '\\\?'];
var separators = ['\\\+', '-', ';', '\\\(', '\\\{', '\\\}', '\\\)', '\\*', '/', ':', '\\\?'];
var errorPart = editor.getLine(this.line).substring(this.column);
var incrMark = this.column + errorPart.split(new RegExp(separators.join('|'), 'g'))[0].length;
if (incrMark === this.column)
@ -27,7 +27,7 @@ ErrorAnnotation.prototype.open = function()
node.id = "annotation"
node.innerHTML = this.content;
node.className = "CodeMirror-errorannotation-context";
this.lineWidget = this.editor.addLineWidget(this.errorMark.find().from.line, node, { coverGutter: true });
this.lineWidget = this.editor.addLineWidget(this.errorMark.find().from.line, node, { coverGutter: false });
this.opened = true;
}

5
mix/qml/html/cm/solarized.css

@ -171,14 +171,13 @@ view-port
/* Error annotation */
.CodeMirror-errorannotation {
background: #b58900;
color: #dc322f !important;
border-bottom: 1px solid #b58900;
}
.CodeMirror-errorannotation-context {
font-family: monospace;
font-size: small;
color: #dc322f;
color: #586e75;
background: #b58900;
padding: 2px;
}

Loading…
Cancel
Save