changed the opacity of highlight color

added opacity on highlighitcode_fullLine
removed anused css class
pull/3/head
LianaHus 5 years ago committed by Liana Husikyan
parent 1f6267d900
commit 1dc53ecff2
  1. 4
      src/app/editor/sourceHighlighter.js
  2. 6
      src/app/ui/styles/renderer-styles.js
  3. 4
      test-browser/tests/staticAnalysis.test.js

@ -47,7 +47,7 @@ class SourceHighlighter {
.highlightcode {
position:absolute;
z-index:20;
opacity: 0.2;
opacity: 0.3;
background-color: ${style || 'var(--info)'};
}
.highlightcode_fullLine {
@ -61,7 +61,7 @@ class SourceHighlighter {
}
`
this.statementMarker = this._deps.editor.addMarker(lineColumnPos, this.source, css.highlightcode.className + ' ' + css.customBackgroundColor.className + ' ' + `highlightLine${lineColumnPos.start.line}`)
this.statementMarker = this._deps.editor.addMarker(lineColumnPos, this.source, css.highlightcode.className + ' ' + css.customBackgroundColor.className + ' ' + `highlightLine${lineColumnPos.start.line}`)
this._deps.editor.scrollToLine(lineColumnPos.start.line, true, true, function () {})
this.position = lineColumnPos
if (lineColumnPos.start.line === lineColumnPos.end.line) {

@ -3,7 +3,6 @@ var yo = require('yo-yo')
var css = yo`<style>
.sol.success,
.sol.error,
.sol.staticAnalysisWarning,
.sol.warning {
white-space: pre-line;
word-wrap: break-word;
@ -17,7 +16,6 @@ var css = yo`<style>
.sol.success pre,
.sol.error pre,
.sol.staticAnalysisWarning pre,
.sol.warning pre {
white-space: pre-line;
overflow-y: hidden;
@ -30,7 +28,6 @@ var css = yo`<style>
}
.sol.success .close,
.sol.staticAnalysisWarning .close,
.sol.error .close,
.sol.warning .close {
white-space: pre-line;
@ -48,9 +45,6 @@ var css = yo`<style>
.sol.warning {
}
.sol.staticAnalysisWarning {
}
.sol.success {
/* background-color: // styles.rightPanel.message_Success_BackgroundColor; */
}</style>`

@ -38,11 +38,11 @@ function runTests (browser) {
.testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['TooMuchGas', 'test1', 'test2'])
.clickLaunchIcon('solidityStaticAnalysis')
.click('#staticanalysisView button')
.waitForElementPresent('#staticanalysisresult .staticAnalysisWarning', 2000, true, function () {
.waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () {
listSelectorContains(['Use of tx.origin',
'Fallback function of contract TooMuchGas requires too much gas',
'TooMuchGas.() : Variables have very similar names test and test1.'],
'#staticanalysisresult .staticAnalysisWarning',
'#staticanalysisresult .warning',
browser, function () {
browser.end()
}

Loading…
Cancel
Save