improve contrast by changing plotperf opacity

This commit is contained in:
Zach Pomerantz 2016-09-27 10:29:35 -07:00
parent 6cee473376
commit c391c26805
4 changed files with 7 additions and 3 deletions

View file

@ -27,7 +27,7 @@ ColumnLayout {
source1: maxWindow
source2: avgWindow
color1: "red"
color2: "dimgrey"
color2: "darkslategrey"
showGraphs: jitter.showGraphs
}
MovingValuePair {
@ -37,7 +37,7 @@ ColumnLayout {
source1: max
source2: avg
color1: "firebrick"
color2: "dimgrey"
color2: "darkslategrey"
showGraphs: jitter.showGraphs
}
}

View file

@ -42,6 +42,7 @@ RowLayout {
valueUnit: value.unit
valueNumDigits: 0
backgroundOpacity: 0.2
plots: [{ binding: "source", color: value.color }]
}

View file

@ -71,6 +71,7 @@ RowLayout {
valueUnit: value.unit
valueNumDigits: 0
backgroundOpacity: 0.2
plots: [{ binding: "source1", color: value.color1 }, { binding: "source2", color: value.color2 }]
}

View file

@ -22,6 +22,8 @@ Item {
// The object used as the default source object for the prop plots
property var object
property var backgroundOpacity: 0.6
// Plots is an array of plot descriptor
// a default plot descriptor expects the following object:
// prop: [ {
@ -185,7 +187,7 @@ Item {
ctx.fillText(text, 0, lineHeight);
}
function displayBackground(ctx) {
ctx.fillStyle = Qt.rgba(0, 0, 0, 0.6);
ctx.fillStyle = Qt.rgba(0, 0, 0, root.backgroundOpacity);
ctx.fillRect(0, 0, width, height);
ctx.strokeStyle= "grey";