diff --git a/CHANGELOG.md b/CHANGELOG.md index bc9d4833..d1347948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - zeroconf: unpublish when shutting down - widgets - modal: added `popupLeft` and `popupTop` properties + - faders/meter: add css variable `--gauge-opacity` to allow setting a fixed gauge opacity for meters and compact faders - custom module - messages converted from midi inputs can be filtered diff --git a/resources/docs/widgets/containers.md b/resources/docs/widgets/containers.md index 57c8d281..6dcd8c85 100644 --- a/resources/docs/widgets/containers.md +++ b/resources/docs/widgets/containers.md @@ -60,7 +60,7 @@ Panels can contains tabs or widgets. These can be absolutely positioned and can - note: this only applies when the panel contains widgets, not tabs ### `css` -``` +```css --nav-height: number[rem|%]; ``` diff --git a/resources/docs/widgets/matrices.md b/resources/docs/widgets/matrices.md index f6902c68..7e2b463d 100644 --- a/resources/docs/widgets/matrices.md +++ b/resources/docs/widgets/matrices.md @@ -181,7 +181,7 @@ This one works pretty much like the multipush, excepts it looks like a piano key - see push's [`options`](buttons/#push) ### `css` -``` +```css --color-white:color; /* white keys color */ --color-black:color; /* black keys color */ ``` diff --git a/resources/docs/widgets/plots.md b/resources/docs/widgets/plots.md index d977a90e..538bdd92 100644 --- a/resources/docs/widgets/plots.md +++ b/resources/docs/widgets/plots.md @@ -234,6 +234,13 @@ Meter displays incoming numerical values (via osc) as a gauge level - default: `[]` - usage: when set, the meter's gauge will be filled with a linear color gradient : each item must be a color string. Example: `["blue", "red"]` +### `css` +```css +--color-gauge:color; +--color-knob:color; /* transparent by default */ +--color-pips:color; +--gauge-opacity:number; +``` ## Image diff --git a/resources/docs/widgets/sliders.md b/resources/docs/widgets/sliders.md index dc6d4cd0..7a4bfe3d 100644 --- a/resources/docs/widgets/sliders.md +++ b/resources/docs/widgets/sliders.md @@ -103,10 +103,11 @@ range: { - usage: overrides the `meter`'s osc address ### `css` -``` +```css --color-gauge:color; --color-knob:color; --color-pips:color; +--gauge-opacity:number; /* compact mode only */ ``` @@ -265,3 +266,12 @@ A range is a fader with two handles. To move the range (both handles at once), h - set to `true` to send separate osc messages for `low` and `high` handles. The `address` will be the same as the widget's with `/low` or `/high` appended to it - can be set as an object to specify a different `address` : `['/osc_address_low', '/osc_address_high']` - note: the widget will only respond to its original osc address, not to the splitted version + + +### `css` +```css +--color-gauge:color; +--color-knob:color; +--color-pips:color; +--gauge-opacity:number; /* compact mode only */ +``` diff --git a/src/browser/js/app/widgets/sliders/fader.js b/src/browser/js/app/widgets/sliders/fader.js index 50b557d6..fca09592 100644 --- a/src/browser/js/app/widgets/sliders/fader.js +++ b/src/browser/js/app/widgets/sliders/fader.js @@ -225,7 +225,7 @@ module.exports = class Fader extends Slider { if (this.getProp('compact')) { - this.ctx.globalAlpha = (dashed ? .3 : .2) + 0.2 * Math.abs(d-o) / (d