fader compact pips: back to text color only

This commit is contained in:
jean-emmanuel 2016-11-16 21:50:00 +01:00
parent 23661b6fdb
commit 11fe06be45

View file

@ -158,29 +158,6 @@ Fader.prototype.draw = function(){
if (this.widgetData.horizontal) {
if (this.widgetData.compact) {
if (!this.widgetData.noPip) {
this.ctx.lineWidth = PXSCALE
this.ctx.globalAlpha = 0.3
var x,
min = Math.min(d,o),
max = Math.max(d,o)
for (var i = 1;i < this.rangeKeys.length - 1;i++) {
x = Math.round(this.percentToCoord(this.rangeKeys[i])) + 0.5 * PXSCALE
if (x < max && x > min) {
this.ctx.strokeStyle = this.colors.gauge
} else {
this.ctx.strokeStyle = this.colors.track
}
this.ctx.beginPath()
this.ctx.moveTo(x, 0)
this.ctx.lineTo(x, this.height)
this.ctx.stroke()
}
}
this.ctx.globalAlpha = 0.3
this.ctx.strokeStyle = this.colors.gauge
this.ctx.beginPath()
@ -189,6 +166,24 @@ Fader.prototype.draw = function(){
this.ctx.lineWidth = this.height
this.ctx.stroke()
if (!this.widgetData.noPip) {
this.ctx.lineWidth = PXSCALE
this.ctx.globalAlpha = 0.05
var x,
min = Math.min(d,o),
max = Math.max(d,o)
for (var i = 1;i < this.rangeKeys.length - 1;i++) {
x = Math.round(this.percentToCoord(this.rangeKeys[i])) + 0.5
this.ctx.strokeStyle = this.colors.text
this.ctx.beginPath()
this.ctx.moveTo(x, 0)
this.ctx.lineTo(x, this.height)
this.ctx.stroke()
}
}
this.ctx.globalAlpha = 1
this.ctx.beginPath()
this.ctx.fillStyle = this.colors.knob
@ -227,28 +222,6 @@ Fader.prototype.draw = function(){
if (this.widgetData.compact) {
if (!this.widgetData.noPip) {
this.ctx.lineWidth = PXSCALE
this.ctx.globalAlpha = 0.3
var y,
min = Math.min(d,o),
max = Math.max(d,o)
for (var i = 1;i < this.rangeKeys.length - 1;i++) {
y = Math.round(this.percentToCoord(this.rangeKeys[i])) + 0.5 * PXSCALE
if (y < max && y > min) {
this.ctx.strokeStyle = this.colors.gauge
} else {
this.ctx.strokeStyle = this.colors.track
}
this.ctx.beginPath()
this.ctx.moveTo(0, y)
this.ctx.lineTo(this.width, y)
this.ctx.stroke()
}
}
this.ctx.globalAlpha = 0.3
this.ctx.strokeStyle = this.colors.gauge
this.ctx.beginPath()
@ -257,6 +230,24 @@ Fader.prototype.draw = function(){
this.ctx.lineWidth = this.width
this.ctx.stroke()
if (!this.widgetData.noPip) {
this.ctx.lineWidth = PXSCALE
this.ctx.globalAlpha = 0.05
var y,
min = Math.min(d,o),
max = Math.max(d,o)
for (var i = 1;i < this.rangeKeys.length - 1;i++) {
y = Math.round(this.percentToCoord(this.rangeKeys[i])) + 0.5
this.ctx.strokeStyle = this.colors.text
this.ctx.beginPath()
this.ctx.moveTo(0, y)
this.ctx.lineTo(this.width, y)
this.ctx.stroke()
}
}
this.ctx.globalAlpha = 1
this.ctx.beginPath()
this.ctx.fillStyle = this.colors.knob