fader: compact: draw pips under gauge
This commit is contained in:
parent
f6e80d1e6f
commit
b8a458dfc5
1 changed files with 16 additions and 16 deletions
|
|
@ -169,14 +169,6 @@ module.exports = class Fader extends _sliders_base {
|
|||
if (this.widgetData.horizontal) {
|
||||
if (this.widgetData.compact) {
|
||||
|
||||
this.ctx.globalAlpha = 0.2 + 0.2 * Math.abs(d-o) / (d<o?o:this.width-o)
|
||||
this.ctx.strokeStyle = this.colors.gauge
|
||||
this.ctx.beginPath()
|
||||
this.ctx.moveTo(d, m)
|
||||
this.ctx.lineTo(o, m)
|
||||
this.ctx.lineWidth = this.height + 1
|
||||
this.ctx.stroke()
|
||||
|
||||
if (!this.widgetData.noPip) {
|
||||
this.ctx.lineWidth = PXSCALE
|
||||
this.ctx.globalAlpha = 1
|
||||
|
|
@ -195,6 +187,14 @@ module.exports = class Fader extends _sliders_base {
|
|||
}
|
||||
}
|
||||
|
||||
this.ctx.globalAlpha = 0.2 + 0.2 * Math.abs(d-o) / (d<o?o:this.width-o)
|
||||
this.ctx.strokeStyle = this.colors.gauge
|
||||
this.ctx.beginPath()
|
||||
this.ctx.moveTo(d, m)
|
||||
this.ctx.lineTo(o, m)
|
||||
this.ctx.lineWidth = this.height + 1
|
||||
this.ctx.stroke()
|
||||
|
||||
this.ctx.globalAlpha = 1
|
||||
this.ctx.beginPath()
|
||||
this.ctx.fillStyle = this.colors.knob
|
||||
|
|
@ -235,14 +235,6 @@ module.exports = class Fader extends _sliders_base {
|
|||
|
||||
if (this.widgetData.compact) {
|
||||
|
||||
this.ctx.globalAlpha = 0.2 + 0.2 * Math.abs(d-o) / (d<o?o:this.height-o)
|
||||
this.ctx.strokeStyle = this.colors.gauge
|
||||
this.ctx.beginPath()
|
||||
this.ctx.moveTo(m, d)
|
||||
this.ctx.lineTo(m, o)
|
||||
this.ctx.lineWidth = this.width + 1
|
||||
this.ctx.stroke()
|
||||
|
||||
if (!this.widgetData.noPip) {
|
||||
this.ctx.lineWidth = PXSCALE
|
||||
this.ctx.globalAlpha = 0.75
|
||||
|
|
@ -261,6 +253,14 @@ module.exports = class Fader extends _sliders_base {
|
|||
this.ctx.stroke()
|
||||
}
|
||||
|
||||
this.ctx.globalAlpha = 0.2 + 0.2 * Math.abs(d-o) / (d<o?o:this.height-o)
|
||||
this.ctx.strokeStyle = this.colors.gauge
|
||||
this.ctx.beginPath()
|
||||
this.ctx.moveTo(m, d)
|
||||
this.ctx.lineTo(m, o)
|
||||
this.ctx.lineWidth = this.width + 1
|
||||
this.ctx.stroke()
|
||||
|
||||
this.ctx.globalAlpha = 1
|
||||
this.ctx.beginPath()
|
||||
this.ctx.fillStyle = this.colors.knob
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue