ui: new design (wip), simpler color scheme, unified knob design, cool faders (inspired by budislavTVP design)

This commit is contained in:
jean-emmanuel 2017-06-20 18:49:10 +02:00
parent 759e8c331e
commit cdb5032266
29 changed files with 684 additions and 660 deletions

File diff suppressed because it is too large Load diff

View file

@ -131,6 +131,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -140,7 +141,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -270,6 +270,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -279,7 +280,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -409,6 +409,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -418,7 +419,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -548,6 +548,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -557,7 +558,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -687,6 +687,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -696,7 +697,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -826,6 +826,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -835,7 +836,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -965,6 +965,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -974,7 +975,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -1104,6 +1104,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -1113,7 +1114,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -1243,6 +1243,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -1252,7 +1253,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -1382,6 +1382,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -1391,7 +1392,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
}
],
@ -1479,6 +1479,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -1488,7 +1489,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -1557,6 +1557,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -1566,7 +1567,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -1635,6 +1635,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -1644,7 +1645,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -1713,6 +1713,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -1722,7 +1723,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -1791,6 +1791,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -1800,7 +1801,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
},
{
@ -1869,6 +1869,7 @@
"spacing": 0,
"variables": {},
"_style": "style",
"_children": "children",
"scroll": true,
"_layout": "layout",
"layout": "",
@ -1878,7 +1879,6 @@
"address": "auto",
"preArgs": [],
"target": [],
"_children": "children",
"tabs": []
}
],

View file

@ -4,11 +4,11 @@ Open Stage Control is a libre desktop OSC bi-directionnal control surface applic
![](img/mockup.png)
<span style="border:1px solid grey;padding:5px">
<span style="border:1px solid lightgrey;padding:5px">
[Try the online demo (chrome 49 required)](http://demo.osc.ammd.net)
</span>
<span style="border:1px solid grey;padding:5px">[**Get the latest release**](https://github.com/jean-emmanuel/open-stage-control/releases)
<span style="border:1px solid lightgrey;padding:5px">[Download the latest release](https://github.com/jean-emmanuel/open-stage-control/releases)
</span>
## Supported platforms

View file

@ -35,7 +35,7 @@ module.exports = class Push extends _widgets_base {
constructor(options) {
super({...options, html: '<div class="light"></div>'})
super({...options, html: '<div class="toggle"><div class="light"></div></div>'})
this.state = 0
this.active = 0

View file

@ -34,7 +34,7 @@ module.exports = class Toggle extends _widgets_base {
constructor(options) {
super({...options, html: '<div class="light"></div>'})
super({...options, html: '<div class="toggle"><div class="light"></div></div>'})
this.widget.value = this.widget.find('span')
this.widget.state = 0

View file

@ -64,6 +64,7 @@ module.exports = class _canvas_base extends _widgets_base {
this.colors.bg = style.getPropertyValue('--color-bg')
this.colors.fg = style.getPropertyValue('--color-fg')
this.colors.faded = style.getPropertyValue('--color-faded')
this.colors.light = style.getPropertyValue('--color-light')
}
requestAnimationFrame(this.draw.bind(this))

View file

@ -79,7 +79,7 @@ module.exports = class Modal extends Panel {
this.setValue(0, {sync:true, send:true})
})
this.light = $('<div class="light"></div>').appendTo(this.container)
this.light = $('<div class="toggle"><div class="light"></div></div>').appendTo(this.container)
if (this.getProp('doubleTap')) {
doubletabreset(this.light, ()=>{
@ -107,7 +107,7 @@ module.exports = class Modal extends Panel {
}
this.fixScrolling()
this.popup.toggle(this.value?true:false)
this.container.toggleClass('on', this.value?true:false)

View file

@ -58,6 +58,10 @@ module.exports = class Multifader extends _matrices_base {
if (this.getProp('horizontal')) {
this.widget.addClass('horizontal')
}
if (this.getProp('compact')) {
this.widget.addClass('compact')
}
var strData = JSON.stringify(options.props)

View file

@ -69,7 +69,7 @@ module.exports = class Rgb extends _pads_base {
h: new Fader({props:{
...faderDefaults,
id:'h',
compact:false,
compact:true,
pips:false,
horizontal:true,
snap:this.getProp('snap'),

View file

@ -148,6 +148,7 @@ module.exports = class _sliders_base extends _canvas_base {
this.colors.track = style.getPropertyValue('--color-track')
this.colors.gauge = style.getPropertyValue('--color-gauge')
this.colors.knob = style.getPropertyValue('--color-knob')
this.colors.pips = style.getPropertyValue('--color-pips')
}
super.resizeHandle(...arguments)

View file

@ -54,7 +54,7 @@ module.exports = class Fader extends _sliders_base {
super(options)
this.widget.addClass('fader')
this.margin = 15
this.margin = 16
if (this.getProp('horizontal')) {
@ -158,7 +158,7 @@ module.exports = class Fader extends _sliders_base {
percentToCoord(percent) {
if (this.getProp('horizontal')) {
return clip(percent / 100,[0,1]) * (this.width - 2 * PXSCALE * this.margin)
return clip(percent / 100,[0,1]) * (this.width - 2 * PXSCALE * this.margin) + this.margin * PXSCALE
} else {
return (this.height - this.margin * PXSCALE) - clip(percent / 100, [0,1]) * (this.height - 2 * PXSCALE * this.margin)
}
@ -176,6 +176,11 @@ module.exports = class Fader extends _sliders_base {
}
}
if (this.getProp('horizontal')) {
this.ctx.rotate(-Math.PI/2)
this.ctx.translate(-this.height, 0)
}
if (CANVAS_SCALING != 1) this.ctx.scale(CANVAS_SCALING, CANVAS_SCALING)
}
@ -183,152 +188,117 @@ module.exports = class Fader extends _sliders_base {
draw() {
var d = Math.round(this.percentToCoord(this.percent)),
o = Math.round(this.percentToCoord(this.valueToPercent(this.originValue))),
m = Math.round(this.getProp('horizontal') ? this.height / 2 : this.width / 2)
var width = this.getProp('horizontal') ? this.height : this.width,
height = !this.getProp('horizontal') ? this.height : this.width
var d = this.percentToCoord(this.percent),
o = this.percentToCoord(this.valueToPercent(this.originValue)),
m = this.getProp('horizontal') ? this.height / 2 : this.width / 2
this.clear()
if (this.getProp('horizontal')) {
if (this.getProp('compact')) {
if (this.getProp('compact')) {
this.ctx.globalAlpha = 0.2 + 0.2 * Math.abs(d-o) / (d<o?o:height-o)
this.ctx.strokeStyle = this.colors.gauge
this.ctx.beginPath()
this.ctx.moveTo(m, d)
this.ctx.lineTo(m, o)
this.ctx.lineWidth = width + 2 * PXSCALE
this.ctx.stroke()
if (this.getProp('pips') && this.rangeKeys.length > 2) {
this.ctx.globalAlpha = 1
var y,
min = Math.min(d,o),
max = Math.max(d,o)
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.getProp('pips') && this.rangeKeys.length > 2) {
this.ctx.lineWidth = 1 * PXSCALE
this.ctx.globalAlpha = 1
this.ctx.strokeStyle = this.colors.bg
var x,
min = Math.min(d,o),
max = Math.max(d,o)
this.ctx.beginPath()
for (var i = 1;i < this.rangeKeys.length - 1;i++) {
x = Math.round(this.percentToCoord(this.rangeKeys[i])) + 0.5
this.ctx.moveTo(x, 0)
this.ctx.lineTo(x, 4 * PXSCALE)
this.ctx.moveTo(x, this.height - 4 * PXSCALE)
this.ctx.lineTo(x, this.height)
}
this.ctx.stroke()
for (var i = 1;i < this.rangeKeys.length - 1;i++) {
y = this.percentToCoord(this.rangeKeys[i])
this.ctx.rect(0, y - PXSCALE, 4.5 * PXSCALE, 2 * PXSCALE)
this.ctx.rect(width - 4.5 * PXSCALE, y - PXSCALE, 4.5 * PXSCALE, 2 * PXSCALE)
}
this.ctx.globalAlpha = 1
this.ctx.beginPath()
this.ctx.fillStyle = this.colors.knob
this.ctx.rect(Math.min(d,this.width-PXSCALE), 0, PXSCALE, this.height)
this.ctx.fillStyle = this.colors.pips
this.ctx.fill()
} else {
this.ctx.lineWidth = Math.round(2 * PXSCALE)
this.ctx.beginPath()
this.ctx.fillStyle = this.colors.light
this.ctx.fill()
this.ctx.lineWidth = 1 * PXSCALE
this.ctx.strokeStyle = this.colors.track
this.ctx.moveTo(this.margin * PXSCALE, m)
this.ctx.lineTo(this.width - this.margin * PXSCALE, m )
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.strokeStyle = this.colors.gauge
this.ctx.moveTo(d + this.margin * PXSCALE, m)
this.ctx.lineTo(o + this.margin * PXSCALE, m)
this.ctx.stroke()
this.ctx.fillStyle = this.colors.knob
this.ctx.globalAlpha = 0.3
this.ctx.arc(d + this.margin * PXSCALE, m, 10 * PXSCALE, Math.PI * 2, false)
this.ctx.fill()
this.ctx.globalAlpha = 1
this.ctx.beginPath()
this.ctx.arc(d + this.margin * PXSCALE, m, 4 * PXSCALE, Math.PI * 2, false)
this.ctx.fill()
this.clearRect = [0, this.height / 2 - 11 * PXSCALE, this.width, 22 * PXSCALE]
}
this.ctx.globalAlpha = 1
this.ctx.beginPath()
this.ctx.fillStyle = this.colors.knob
this.ctx.rect(0, Math.min(d, height - PXSCALE), width, PXSCALE)
this.ctx.fill()
this.clearRect = [0, 0, width, height]
} else {
if (this.getProp('compact')) {
this.ctx.lineWidth = 6 * PXSCALE
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.beginPath()
this.ctx.globalAlpha = 1
this.ctx.strokeStyle = this.colors.light
this.ctx.moveTo(m, this.margin * PXSCALE - 2 * PXSCALE)
this.ctx.lineTo(m, height - this.margin * PXSCALE + 2 * PXSCALE)
this.ctx.stroke()
if (this.getProp('pips') && this.rangeKeys.length > 2) {
this.ctx.lineWidth = 1 * PXSCALE
this.ctx.globalAlpha = 1
this.ctx.strokeStyle = this.colors.bg
this.ctx.lineWidth = 4 * PXSCALE
var y,
min = Math.min(d,o),
max = Math.max(d,o)
this.ctx.beginPath()
this.ctx.globalAlpha = 1
this.ctx.strokeStyle = this.colors.bg
this.ctx.moveTo(m, this.margin * PXSCALE - PXSCALE)
this.ctx.lineTo(m, height - this.margin * PXSCALE + PXSCALE)
this.ctx.stroke()
this.ctx.beginPath()
for (var i = 1;i < this.rangeKeys.length - 1;i++) {
y = Math.round(this.percentToCoord(this.rangeKeys[i])) + 0.5
this.ctx.moveTo(0, y)
this.ctx.lineTo(4 * PXSCALE, y)
this.ctx.moveTo(this.width - 4 * PXSCALE, y)
this.ctx.lineTo(this.width, y)
}
this.ctx.stroke()
}
this.ctx.lineWidth = 2 * PXSCALE
this.ctx.globalAlpha = 1
this.ctx.beginPath()
this.ctx.fillStyle = this.colors.knob
this.ctx.rect(0, Math.min(d, this.height - PXSCALE), this.width, PXSCALE)
this.ctx.fill()
this.ctx.beginPath()
this.ctx.strokeStyle = this.colors.track
this.ctx.moveTo(m, this.margin * PXSCALE)
this.ctx.lineTo(m, height - this.margin * PXSCALE)
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.globalAlpha = 1
this.ctx.strokeStyle = this.colors.gauge
this.ctx.moveTo(m, d)
this.ctx.lineTo(m, o)
this.ctx.stroke()
} else {
this.ctx.globalAlpha = 1
this.ctx.lineWidth = Math.round(2 * PXSCALE)
this.ctx.beginPath()
this.ctx.rect(m - 9 * PXSCALE, d - 15 * PXSCALE, 18 * PXSCALE, 30 * PXSCALE)
this.ctx.lineWidth = PXSCALE
this.ctx.fillStyle = this.colors.track
this.ctx.fill()
this.ctx.beginPath()
this.ctx.strokeStyle = this.colors.track
this.ctx.moveTo(m, this.margin * PXSCALE)
this.ctx.lineTo(m, this.height - this.margin * PXSCALE)
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.rect(m - 8 * PXSCALE, d - 14 * PXSCALE, 16 * PXSCALE, 28 * PXSCALE)
this.ctx.fillStyle = this.colors.raised
this.ctx.fill()
this.ctx.lineWidth = PXSCALE
this.ctx.beginPath()
this.ctx.strokeStyle = this.colors.gauge
this.ctx.moveTo(m, d)
this.ctx.lineTo(m, o)
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.rect(m - 7 * PXSCALE, d - 13 * PXSCALE, 14 * PXSCALE, 26 * PXSCALE)
this.ctx.lineWidth = PXSCALE
this.ctx.strokeStyle = this.colors.light
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.rect(m - 4 * PXSCALE, d, 8 * PXSCALE, PXSCALE)
this.ctx.fillStyle = this.colors.knob
this.ctx.fill()
this.ctx.beginPath()
this.ctx.fillStyle = this.colors.knob
this.ctx.globalAlpha = 0.3
this.ctx.arc(m, d, 10 * PXSCALE, Math.PI * 2,false)
this.ctx.fill()
this.ctx.globalAlpha = 1
this.ctx.beginPath()
this.ctx.arc(m, d, 4 * PXSCALE, Math.PI * 2,false)
this.ctx.fill()
this.clearRect = [this.width / 2 - 11 * PXSCALE, 0, 22 * PXSCALE, this.height]
}
this.clearRect = [width / 2 - 11 * PXSCALE, 0, 22 * PXSCALE, height]
}
}

View file

@ -20,7 +20,6 @@ module.exports = class Knob extends _sliders_base {
height:'auto',
color:'auto',
pips:true,
compact:false,
angle:270,
css:'',
@ -53,12 +52,9 @@ module.exports = class Knob extends _sliders_base {
this.margin = 5
if (this.getProp('compact')) {
this.widget.addClass('compact')
this.margin = 0
}
this.widget.addClass('compact')
if (this.getProp('pips') && !this.getProp('compact')) {
if (this.getProp('pips')) {
this.wrapper.append(`
<div class="pips">
<div>${this.rangeLabels[0]}</div><div>${this.rangeLabels[this.rangeLabels.length-1]}</div>
@ -73,9 +69,7 @@ module.exports = class Knob extends _sliders_base {
this.maxAngle = this.getProp('angle')
// calculate lost height factor
var a = this.getProp('compact') ?
(1 - Math.sin((Math.max(this.maxAngle,247.5) - 180) / 2 * Math.PI / 180)) / 3
: 1 - Math.sin((Math.max(this.maxAngle,180) - 180) / 2 * Math.PI / 180)
var a = (1 - Math.sin((Math.max(this.maxAngle,247.5) - 180) / 2 * Math.PI / 180)) / 3
this.lostHeightFactor = a / 4
}
@ -144,13 +138,9 @@ module.exports = class Knob extends _sliders_base {
super.resizeHandle(...arguments)
this.minDimension = Math.min(this.width, this.height)
this.gaugeWidth = this.minDimension / 8
this.gaugeWidth = this.minDimension / 12
if (this.getProp('compact')) {
this.canvas[0].style.top = this.input[0].style.marginTop = (this.minDimension) * this.lostHeightFactor - (this.getProp('label') === false ? 0 : this.gaugeWidth / 4) + 'px'
} else {
this.canvas[0].style.top = Math.min((this.minDimension) * this.lostHeightFactor - (this.getProp('label') === false ? 0 : this.margin * PXSCALE / 2), this.input.outerHeight() * .5) + 'px'
}
this.canvas[0].style.top = (this.minDimension) * this.lostHeightFactor - (this.getProp('label') === false ? 0 : this.gaugeWidth / 4) + 'px'
}
@ -163,131 +153,87 @@ module.exports = class Knob extends _sliders_base {
this.ctx.clearRect(0,0,this.width,this.height)
if (this.getProp('compact')) {
this.ctx.globalAlpha = 1
this.ctx.strokeStyle = this.colors.track
this.ctx.globalAlpha = 0.3
this.ctx.lineWidth = this.gaugeWidth
this.ctx.beginPath()
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth - this.margin * PXSCALE, min, max)
this.ctx.stroke()
this.ctx.strokeStyle = this.colors.light
this.ctx.lineWidth = 7 * PXSCALE
this.ctx.beginPath()
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth - this.margin * PXSCALE, min - 0.06, max + 0.06)
this.ctx.stroke()
this.ctx.lineWidth = this.gaugeWidth
this.ctx.globalAlpha = 0.3 + 0.2 * Math.abs(d-o) / (d<o?o-min:max-o)
this.ctx.beginPath()
this.ctx.strokeStyle = this.colors.gauge
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth - this.margin * PXSCALE, Math.min(o,d), Math.max(o,d))
this.ctx.stroke()
this.ctx.strokeStyle = this.colors.bg
this.ctx.lineWidth = 5 * PXSCALE
this.ctx.beginPath()
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth - this.margin * PXSCALE, min - 0.03, max + 0.03)
this.ctx.stroke()
if (this.getProp('pips')) {
this.ctx.globalAlpha = 1
this.ctx.strokeStyle = this.colors.track
this.ctx.lineWidth = 2 * PXSCALE
this.ctx.beginPath()
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth - this.margin * PXSCALE, min, max)
this.ctx.stroke()
this.ctx.strokeStyle = this.colors.gauge
this.ctx.lineWidth = 2 * PXSCALE
this.ctx.beginPath()
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth - this.margin * PXSCALE, Math.min(o,d), Math.max(o,d))
this.ctx.stroke()
if (this.getProp('pips')) {
this.ctx.globalAlpha = 1
for (var pip of this.rangeKeys.concat(this.valueToPercent(this.originValue))) {
if ((pip == 0 || pip == 100) && this.maxAngle < 360) continue
let r1 = this.minDimension / 2 - this.gaugeWidth - this.margin * PXSCALE - 3.5 * PXSCALE,
r2 = this.minDimension / 2 - this.gaugeWidth - this.margin * PXSCALE + 3.5 * PXSCALE,
a = 2 * Math.PI - this.percentToAngle(pip)
this.ctx.beginPath()
this.ctx.moveTo(r1 * Math.cos(a) + this.width / 2, this.height / 2 - r1 * Math.sin(a))
this.ctx.lineTo(r2 * Math.cos(a) + this.width / 2, this.height / 2 - r2 * Math.sin(a))
this.ctx.strokeStyle = this.colors.fg
this.ctx.lineWidth = 2 * PXSCALE
for (var pip of this.rangeKeys.concat(this.valueToPercent(this.originValue))) {
if ((pip == 0 || pip == 100) && this.maxAngle < 360) continue
let r1 = this.minDimension / 2 - this.gaugeWidth/2 - this.margin * PXSCALE,
r2 = this.minDimension / 2 - this.gaugeWidth * 1.5 - this.margin * PXSCALE,
a = 2 * Math.PI - this.percentToAngle(pip)
this.ctx.beginPath()
this.ctx.moveTo(r1 * Math.cos(a) + this.width / 2, this.height / 2 - r1 * Math.sin(a))
this.ctx.lineTo(r2 * Math.cos(a) + this.width / 2, this.height / 2 - r2 * Math.sin(a))
this.ctx.stroke()
}
this.ctx.stroke()
}
// knob
this.ctx.fillStyle = this.colors.fg
this.ctx.beginPath()
this.ctx.globalAlpha = 1
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth * 1.25, 0, Math.PI * 2)
this.ctx.fill()
this.ctx.fillStyle = this.colors.raised
this.ctx.strokeStyle = this.colors.raised
this.ctx.beginPath()
this.ctx.globalAlpha = 1
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth * 1.5, 0, Math.PI * 2)
this.ctx.fill()
this.ctx.globalAlpha = 1
this.ctx.beginPath()
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth * 2, 0, Math.PI * 2)
this.ctx.fill()
this.ctx.lineWidth = 1 * PXSCALE
this.ctx.stroke()
this.ctx.globalAlpha = 0.3
this.ctx.lineWidth = 1.1 * PXSCALE
this.ctx.stroke()
// cursor
this.ctx.globalAlpha = 0.75
this.ctx.strokeStyle = this.colors.knob
this.ctx.lineWidth = 2 * PXSCALE
let r1 = this.minDimension / 2 - this.gaugeWidth * 2 - this.margin * PXSCALE + 1.1 * PXSCALE,
r2 = this.minDimension / 2 - this.gaugeWidth * 1.5 - this.margin * PXSCALE,
a = 2 * Math.PI - d
this.ctx.beginPath()
this.ctx.moveTo(r1 * Math.cos(a) + this.width / 2, this.height / 2 - r1 * Math.sin(a))
this.ctx.lineTo(r2 * Math.cos(a) + this.width / 2, this.height / 2 - r2 * Math.sin(a))
this.ctx.stroke()
} else {
var r = Math.max(this.minDimension / 2 - (30 + this.margin) * PXSCALE, 2 * PXSCALE)
this.ctx.beginPath()
this.ctx.fillStyle = this.colors.raised
this.ctx.strokeStyle = this.colors.raised
this.ctx.arc(this.width / 2, this.height / 2, r, 0, Math.PI * 2)
this.ctx.fill()
this.ctx.lineWidth = 1 * PXSCALE
this.ctx.stroke()
this.ctx.globalAlpha = 0.3
this.ctx.lineWidth = 1.1 * PXSCALE
this.ctx.stroke()
this.ctx.globalAlpha = 1
this.ctx.lineWidth = 2 * PXSCALE
this.ctx.beginPath()
this.ctx.strokeStyle = this.colors.track
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - (10 + this.margin) * PXSCALE, min, max)
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.strokeStyle = this.colors.gauge
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - (10 + this.margin) * PXSCALE, Math.min(o,d), Math.max(o,d))
this.ctx.stroke()
this.ctx.save()
this.ctx.translate(this.width / 2, this.height / 2)
this.ctx.rotate(d)
this.ctx.translate(-this.width / 2, -this.height / 2)
this.ctx.beginPath()
this.ctx.fillStyle = this.colors.knob
this.ctx.arc(this.width / 2 + this.minDimension / 2 - (10 + this.margin) * PXSCALE, this.height / 2, 4 * PXSCALE, 0, Math.PI * 2)
this.ctx.fill()
this.ctx.globalAlpha = 0.3
this.ctx.fillStyle = this.colors.knob
this.ctx.arc(this.width / 2 + this.minDimension / 2 - (10 + this.margin) * PXSCALE, this.height / 2, 10 * PXSCALE, 0, Math.PI * 2)
this.ctx.fill()
this.ctx.restore()
}
// knob
this.ctx.lineWidth = PXSCALE
this.ctx.fillStyle = this.colors.raised
this.ctx.beginPath()
this.ctx.globalAlpha = 1
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth * 2 - this.margin * PXSCALE, 0, Math.PI * 2)
this.ctx.fill()
this.ctx.strokeStyle = this.colors.track
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.globalAlpha = 1
this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - this.gaugeWidth * 2 - this.margin * PXSCALE - PXSCALE, 0, Math.PI * 2)
this.ctx.strokeStyle = this.colors.light
this.ctx.stroke()
// cursor
this.ctx.globalAlpha = 1
let r1 = this.minDimension / 2 - this.gaugeWidth * 2 - this.margin * PXSCALE,
r2 = this.minDimension / 2 - this.gaugeWidth * 3 - this.margin * PXSCALE,
a = 2 * Math.PI - d
this.ctx.beginPath()
this.ctx.moveTo(r1 * Math.cos(a) + this.width / 2, this.height / 2 - r1 * Math.sin(a))
this.ctx.lineTo((r1/2) * Math.cos(a) + this.width / 2, this.height / 2 - (r1/2) * Math.sin(a))
this.ctx.lineWidth = 2 * PXSCALE
this.ctx.strokeStyle = this.colors.knob
this.ctx.stroke()
}
}

View file

@ -1,8 +1,11 @@
#editor {
box-shadow: 0 2rem 0 0 var(--color-bg) inset, 0 3rem 0 0 var(--color-light) inset;
box-shadow: 0 0 0 1rem var(--color-light) inset;
background: var(--color-fg);
padding: 1rem 8rem 8rem;
margin-top: 2rem;
&:empty {
padding:0;
margin: 0;
}
ul {
padding: 4rem;
@ -19,9 +22,9 @@
right:0rem;
top:0rem;
padding:8rem;
color:var(--color-text-fade);
opacity: 0.6;
&:hover {
color:var(--color-text);
opacity: 1;
}
}
@ -29,7 +32,6 @@
margin-top: 10rem;
}
}
.form {
line-height: 18rem;
.input-wrapper {
@ -76,7 +78,7 @@
label {
display: block;
font-size: 10rem;
background: var(--color-faded);
// background: var(--color-track);
}
.info {
color:var(--color-text-fade);
@ -89,7 +91,7 @@
color:var(--color-text);
width:100%;
.btn {
background: var(--color-light-fg);
background: var(--color-raised);
box-shadow: 0 1rem 0 0 var(--color-light) inset;
border-radius: 2rem;
}
@ -150,8 +152,8 @@
position: relative;
display: flex;
align-items: center;
background: var(--color-faded);
border: 1rem solid var(--color-bg);
box-shadow: 0 0 0 1rem var(--color-light) inset;
span {
text-transform: lowercase;
font-variant: small-caps;
@ -188,7 +190,7 @@
.context-menu {
position:fixed;
z-index: 999999999;
background: var(--color-light-fg);
background: var(--color-raised);
box-shadow: 0 0 4rem 1rem var(--color-bg);
.item {
color:var(--color-text)

View file

@ -23,7 +23,7 @@ body {
margin-bottom: 1rem;
margin-left: 1rem;
flex-shrink:0;
font-weight:bold;
// font-weight:bold;
text-transform: uppercase;
background: transparent;
height:calc(var(--nav-height) - 2rem);
@ -68,8 +68,7 @@ body {
}
}
a {
background: var(--color-light-fg);
// background: var(--color-fg);
background: var(--color-raised);
pointer-events: none;
padding: 5rem;
height:100%;
@ -78,7 +77,7 @@ body {
overflow:hidden;
text-align:center;
position:relative;
box-shadow: 0 1rem 0 0 var(--color-light) inset;
box-shadow: 0 0 0 1rem var(--color-light) inset;
letter-spacing: 1rem;
span {
display:block;
@ -101,8 +100,10 @@ body {
&.on a, .sidepanel-open {
position: relative;
z-index: 0;
background:var(--color-fg);
color: var(--color-custom);
&:after {
opacity:0.3;
// opacity:0.3;
}
}
}

View file

@ -21,7 +21,7 @@
border-top:2rem solid var(--color-bg);
}
::-webkit-scrollbar-thumb {
background: var(--color-light-fg);
background: var(--color-raised);
&:vertical {
border-left:2rem solid var(--color-bg);

View file

@ -10,13 +10,15 @@
right:0;
bottom:0;
margin-right:calc(-1 * var(--sidepanel-size));
background:var(--color-fg);
background:var(--color-bg);
transition:transform .25s, opacity .25s;
transform: translate3d(0,0,0);
opacity: 0;
overflow-y: auto;
overflow-x: visible;
box-shadow: 0 0 15rem 0 var(--color-bg), 0 0 0 2rem var(--color-bg);
display: flex;
flex-direction: column;
&.sidepanel-open {
transform: translate3d(calc(-1 * var(--sidepanel-size)),0,0);
@ -24,7 +26,8 @@
}
.navigation {
box-shadow: 0 2rem 0 0 var(--color-bg), 0 3rem 0 0 var(--color-light);
margin-bottom:2rem;
margin-left: 0;
li {
cursor:default;
}
@ -37,8 +40,10 @@
}
#options {
box-shadow: 0 0 0 1rem var(--color-light) inset;
background: var(--color-fg);
padding: 8rem;
margin-bottom: 1rem;
flex:1;
li {
display: block;
margin-bottom: 8rem;
@ -57,7 +62,8 @@
flex-wrap:wrap;
.title {
flex: 1 1 100%;
background: var(--color-faded);
background: var(--color-fg);
box-shadow: 0 0 0 1rem var(--color-light) inset;
padding: 10rem;
position: relative;
&.disabled {

View file

@ -3,7 +3,7 @@ $accent: adjust_hue($base, -10);
:root {
/*
--color-text:rgba(white,.8);
--color-text-fade:rgba(white,0.5);
@ -16,7 +16,7 @@ $accent: adjust_hue($base, -10);
--color-bg: darken(desaturate($base,75%),53%);
--color-light:rgba(lighten($accent,10%),.1);
--color-light-fg: mix(darken(desaturate($base,75%),45%), lighten($accent,10%), 90%);
--color-raised: mix(darken(desaturate($base,75%),45%), lighten($accent,10%), 90%);
--color-faded: darken(desaturate($base,70%),46%);
@ -34,9 +34,38 @@ $accent: adjust_hue($base, -10);
--grid-width:10;
/* Unset variables by default
--display-input:none; // Hides widgets' numeric inputs
*/
--color-text:rgba(white,.8);
--color-text-fade:rgba(white,0.5);
// --color-accent:#13dbe2;
--color-accent:$accent;
--color-custom:var(--color-accent);
--color-grid: transparentize($accent, 0.9);
--color-fg: #313c49;
--color-bg: #1e2833;
--color-raised: #3d4956;
--color-track: #222d38;
--color-raised-2: #516173;
--color-light:rgba(white, .06);
--color-faded: darken(desaturate($base,70%),46%);
--nav-height:40rem;
--sidepanel-size:300rem;
--scrollbar-size:20rem;
--pixel-scale:1;
--grid-width:10;
}

View file

@ -5,10 +5,10 @@
overflow: hidden;
position:relative;
vertical-align:top;
box-shadow: 0.5rem 0.5rem 0 0.5rem var(--color-bg), 0 1rem 0 0 var(--color-light) inset;
color:var(--color-bg);
border-left:1rem solid var(--color-bg);
border-top:1rem solid var(--color-bg);
box-shadow: 0.5rem 0.5rem 0 0.5rem var(--color-border), 0 0 0 1rem var(--color-light) inset;
border-left:1rem solid var(--color-border);
border-top:1rem solid var(--color-border);
-webkit-tap-highlight-color:transparent;
min-height:30rem;
min-width:30rem;

View file

@ -54,7 +54,7 @@ i {
.btn {
background: var(--color-light-fg);
background: var(--color-raised);
display: block;
padding:15rem;
position: relative;
@ -62,7 +62,7 @@ i {
text-overflow: ellipsis;
overflow: hidden;
cursor: pointer;
box-shadow: 0 1rem 0 0 var(--color-light) inset;
box-shadow: 0 0 0 1rem var(--color-light) inset;
&.small {
padding:8rem;
@ -131,22 +131,21 @@ i {
white-space: nowrap;
text-overflow: ellipsis;
flex-grow: 0;
background-color: var(--color-faded);
background-color: var(--color-fg);
color:var(--color-accent);
font-size:16rem;
line-height: 20rem;
text-transform: uppercase;
letter-spacing: 2rem;
letter-spacing: 2.5rem;
box-shadow: 0 1rem 0 0 var(--color-light) inset;
}
.footer {
background: var(--color-raised);
background: var(--color-fg);
white-space: nowrap;
text-overflow: ellipsis;
flex-grow: 0;
background: var(--color-faded);
border-top:2rem solid var(--color-bg);
}
a {
@ -170,7 +169,7 @@ i {
right:0rem;
top:0rem;
padding:15rem;
color:var(--color-text-fade);
color:var(--color-text-fader);
}
}
}
@ -248,14 +247,14 @@ i {
}
}
.header {
background: var(--color-faded);
background: var(--color-fg);
border: 1rem solid var(--color-bg);
margin-bottom: -1rem;
color: var(--color-accent);
cursor: default;
z-index: 2;
box-shadow: none;
box-shadow: 0 1rem 0 0 var(--color-light) inset;
box-shadow: 0 0 0 1rem var(--color-light) inset;
#title {
text-transform: uppercase;
@ -284,8 +283,7 @@ i {
left:0;
right: 0;
bottom:0;
// box-shadow: 0 0 1rem 0 var(--color-text-fade) inset;
box-shadow: 0 1rem 0 0 var(--color-light) inset;
box-shadow: 0 0 0 1rem var(--color-light) inset;
pointer-events: none;
}
&.disabled {
@ -400,7 +398,7 @@ i {
.popup-title {
position: relative;
padding:15rem;
background:var(--color-light-fg);
background:var(--color-raised);
border-bottom: 1rem solid var(--color-bg);
box-shadow: 0 1rem 0 0 var(--color-light) inset;
height:46rem;

View file

@ -2,7 +2,6 @@
--color-pips: var(--color-text-fade);
--color-gauge: var(--color-custom);
--color-knob: var(--color-custom);
--color-track: var(--color-bg);
width:100rem;
height:100%;
@ -10,6 +9,8 @@
height:130rem;
width:100%
}
}
.fader {
@ -28,6 +29,7 @@
display: flex;
canvas {
image-rendering: pixelated;
width: 100%;
}
@ -63,8 +65,8 @@
pointer-events: none;
position: absolute;
top:15rem;
bottom:15rem;
top:16rem;
bottom:16rem;
left:50%;
z-index: 0;
width: 4rem;
@ -151,8 +153,8 @@
.pips {
top:50%;
left:15rem;
right:15rem;
left:16rem;
right:16rem;
font-size: 0;
height:4rem;
width:auto;
@ -180,9 +182,17 @@
}
}
&.compact {
box-shadow: 0 0 0 1rem var(--color-bg);
.wrapper canvas {
background: var(--color-faded)
--color-pips: var(--color-raised);
border:1rem solid var(--color-light);
.wrapper > canvas {
border:1rem solid var(--color-bg);
}
.wrapper {
canvas {
background: var(--color-track);
}
}
.input {
overflow: hidden;

View file

@ -2,12 +2,13 @@
--color-pips: var(--color-text-fade);
--color-gauge: var(--color-custom);
--color-knob: var(--color-custom);
--color-track: var(--color-bg);
width: 100rem;
height: 120rem;
align-items: center;
.input {
// display: none!important;
}
}
.knob {
@ -29,15 +30,10 @@
canvas {
width: 100%;
position: relative;
image-rendering: pixelated;
}
}
&.compact {
.input {
position: absolute;
top:calc(50% - 12rem);
pointer-events: none;
}
}
.pips {
position: absolute;
bottom: 0;

View file

@ -1,14 +1,12 @@
.formula-container {
width: 100rem;
height:60rem;
.label {
box-shadow: 0 -11rem 10rem 10rem var(--color-bg);
z-index: 1;
}
.formula {
display:flex;
height:100%;
background: var(--color-faded);
background: var(--color-track);
margin:1rem;
border:1rem solid var(--color-bg);
.input {
height:auto;
width: 100%;

View file

@ -8,20 +8,18 @@
&.nolabel .matrix {
top:0;
}
> .label {
border-bottom:1rem solid var(--color-bg);
}
}
.matrix {
flex:1;
overflow: auto;
background: var(--color-bg);
// background: var(--color-bg);
display: flex;
flex-wrap: wrap;
flex-direction: row;
margin-left:-1rem;
margin-right:-1rem;
margin-top: -1rem;
padding:1rem 2rem 2rem 1rem;
> .widget {
min-height: 0;
@ -37,7 +35,7 @@
.multifader-container {
.matrix {
padding:0!important;
// padding:0!important;
align-items:stretch;
flex-wrap: nowrap;
&.horizontal {
@ -72,6 +70,22 @@
> .fader {
height: auto;
flex: 1;
}
}
&.compact {
> .widget {
// box-shadow: none;
.label {
box-shadow: 0.5rem 0.5rem 0 0.5rem var(--color-bg);
box-shadow: 0 0 0 1rem var(--color-light) inset;
}
.wrapper {
padding:0;
canvas{
border:none;
}
}
}
}
}
@ -81,36 +95,32 @@
left:0!important;
}
}
}
.keyboard-container {
--color-black: var(--color-light-fg);
--color-black: var(--color-raised);
--color-white: #ccc;
height:90rem;
width:240rem;
.label {
border-bottom: 1rem solid var(--color-bg);
}
.matrix {
position: relative;
overflow: hidden;
.white {
--color-light-fg: var(--color-white);
.light.active:before {
opacity: .5;
background:var(--color-fg);
}
--color-raised: var(--color-white);
// &.active {
// background:var(--color-custom);
// }
}
.black {
--color-light-fg: var(--color-black);
--color-raised: var(--color-black);
position: absolute;
z-index: 1;
top:0;
z-index: 2;
top:1rem;
height: 65%;
.light.active:before {
opacity: 1;
background:var(--color-fg);
}
// &.active {
// background:var(--color-custom);
// }
}
}
}

View file

@ -1,11 +1,12 @@
.xy-container, .rgb-container, .multixy-container {
width:200rem;
height:250rem;
padding:1rem;
.label {
flex-shrink: 0;
box-shadow: 0 -11rem 10rem 10rem var(--color-bg);
z-index: 1;
}
}
.pad {
height:100%;
@ -17,14 +18,12 @@
display: flex;
text-align: center;
flex-shrink: 0;
background: var(--color-fg);
}
> .wrapper {
position: relative;
height: 100%;
width: 100%;
background:var(--color-faded);
box-shadow: 0 1rem 0 0 var(--color-light);
background:var(--color-track);
> canvas {
width:100%;
@ -32,6 +31,7 @@
position: absolute;
pointer-events: none;
z-index: 1;
border: 1rem solid var(--color-bg);
}
.fader {
pointer-events: none;
@ -42,10 +42,14 @@
--color-knob:transparent;
--color-gauge:transparent;
box-shadow: none;
border: 0;
* {
background: transparent!important;
}
canvas {
border:none;
}
.input {
display: none;
}
@ -57,6 +61,7 @@
.pad {
> .wrapper {
background: red;
> canvas {
z-index: 1;
}
@ -77,30 +82,34 @@
}
}
> .hue-wrapper {
position: relative;
height: 30rem;
height: 14rem;
margin: 6rem;
z-index: 1;
&:before {
content:"";
position: absolute;
left:0;
top:11rem;
left:12rem;
right:12rem;
height: 8rem;
background:transparent linear-gradient(to left, #F00, #FF0080, #F0F, #8000FF, #00F, #0080FF, #0FF, #00FF80, #0F0, #80FF00, #FF0, #FF8000, #F00) repeat scroll 0% 0%;
z-index: -1;
opacity: .6;
border-radius: 15rem;
box-shadow: 0 0 0 7rem var(--color-bg), 0 1rem 0 7rem var(--color-light), 0 1rem 0 7rem var(--color-light);
}
.fader {
position: relative;
border-radius: 3rem;
&:after {
content:"";
position: absolute;
left:2rem;
top:1rem;
bottom:1rem;
right:1rem;
background:transparent linear-gradient(to left, #F00, #FF0080, #F0F, #8000FF, #00F, #0080FF, #0FF, #00FF80, #0F0, #80FF00, #FF0, #FF8000, #F00) repeat scroll 0% 0%;
z-index: -1;
opacity: 0.7;
border-radius: inherit;
}
--color-knob:white;
--color-gauge:transparent;
--color-track:transparent;
.wrapper {
border-radius: inherit;
}
canvas {
background: transparent;
border-radius: inherit;
}
}
.input {
@ -149,6 +158,9 @@
.wrapper {
background: transparent;
}
canvas {
border:none;
}
.row {
display: none;
}

View file

@ -1,8 +1,13 @@
.panel-container-base {
--color-border:var(--color-bg);
z-index: 1;
box-shadow: 0.5rem 0.5rem 0 0.5rem var(--color-border), 0 0 0 1rem var(--color-light) inset!important;
> .label {
border-bottom:1rem solid var(--color-bg);
z-index: 1;
border-bottom:1rem solid var(--color-border);
z-index: 20;
box-shadow: 0 -1rem 0 0 var(--color-light) inset;
}
.panel {
@ -12,13 +17,30 @@
left:-1rem;
right:0;
bottom:0;
background: var(--color-fg);
--color-border: var(--color-fg);
box-shadow: 0.5rem 0.5rem 0 1.5rem var(--color-light) inset;
&.tab, &.root, &.has-tabs {
background: var(--color-bg);
--color-border: var(--color-bg);
box-shadow: none;
}
&:not(.tab) {
> .widget {
box-shadow: 0.5rem 0.5rem 0 0.5rem var(--color-border);
background: transparent;
}
}
&.has-tabs {
top:30rem;
display: flex;
flex-direction: column;
background: var(--color-bg);
> .tabs-wrapper {
background: var(--color-fg);
display: flex;
flex-direction: column;
left:-1rem;
@ -78,9 +100,11 @@
.strip-container {
@extend .panel-container-base;
width: 100rem;
height: 100%;
background: var(--color-fg)!important;
&.horizontal {
width: 100%;
height: 130rem;
@ -89,6 +113,7 @@
&.vertical {
> .panel {
display: flex;
flex-direction: column;
align-items: stretch;
@ -123,7 +148,9 @@
flex-shrink: 0;
height:100%;
border-bottom:0;
border-right:1rem solid var(--color-bg);
border-right:1rem solid var(--color-border);
box-shadow: -1rem 0 0 0 var(--color-light) inset;
position: relative;
max-height: initial;
span {
transform: rotate(180deg);
@ -154,24 +181,26 @@
}
.modal-container {
@extend .panel-container-base;
@extend .toggle-container;
> .light:after {
.toggle .light:after {
content:"\f077";
font-family: FontAwesome;
border:0;
padding: 2rem 4rem;
opacity: .5;
transform: rotateZ(45deg);
display: block;
width:10rem;
height:10rem;
right:2rem;
top:2rem;
left:auto;
line-height: 10rem;
text-align: center;
float:right;
position: static;
position: absolute;;
box-shadow: none;
background: none;
color:var(--color-track);
text-shadow: 0 0 1rem var(--color-light);
}
> .label {
top:0;
@ -218,6 +247,10 @@
}
&.on {
z-index: 99999;
@extend .panel-container-base;
.toggle .light:after {
color:var(--color-custom);
}
}
}
@ -236,7 +269,7 @@
.tab-container, .root-container {
height: 100%;
box-shadow: none;
background: var(--color-bg)!important;
> .panel {
transform: rotateZ(0);

View file

@ -29,29 +29,22 @@
.plot-container, .visualizer-container, .eq-container {
--color-custom:var(--color-accent);
height: 200rem;
width: 200rem;
padding:1rem;
.plot {
display: flex;
flex-direction: row;
flex:1;
position: relative;
background:linear-gradient(to right, var(--color-faded), var(--color-fg) 300%);
&:after {
content:"";
position: absolute;
box-shadow: 0 10rem 10rem -12rem var(--color-bg) inset, 0 -10rem 10rem -12rem var(--color-bg) inset;
height: 100%;
width: 100%;
z-index: 2;
}
background: var(--color-track);
}
canvas {
position: absolute;
top:0;left:0;
width:100%;
height: 100%;
border:1rem solid var(--color-bg);
}
}
@ -70,10 +63,6 @@
.text-container {
--color-custom:var(--color-accent);
flex-shrink: 0;
.label {
box-shadow: 0 -11rem 10rem 10rem var(--color-bg);
z-index: 1;
}
.text {
flex: 1;
height:35rem;
@ -81,8 +70,10 @@
justify-content: center;
display: flex;
align-items: center;
background: var(--color-faded);
background: var(--color-track);
color:var(--color-custom);
margin:1rem;
border: 1rem solid var(--color-bg);
&.vertical {
transform: rotate(180deg);
text-overflow: ellipsis;

View file

@ -1,12 +1,17 @@
.push-container {
@extend .toggle-container;
> .label {
top:0;
}
.active {
background: var(--color-light);
}
.light:after{
display: none;
// .label {
// top:0;
// }
.toggle {
&.active {
background-color: var(--color-fg);
}
&.on .light:before {
opacity: 0.3;
}
.light:after{
display: none;
}
}
}

View file

@ -1,11 +1,13 @@
.switch-container {
--color-border:var(--color-bg);
z-index: 1;
width:100rem;
.label {
border-bottom: 1rem solid var(--color-bg);
}
&.nolabel {
.switch .value:first-child {
box-shadow: none!important;
// box-shadow: none!important;
}
.switch.horizontal .value {
box-shadow: none;
@ -20,6 +22,8 @@
align-items: stretch;
flex:1;
z-index: 1;
background:var(--color-bg);
&.horizontal {
flex-direction:row;
@ -39,13 +43,14 @@
}
}
.value {
background:var(--color-light);
background:var(--color-raised);
padding:6rem;
color:var(--color-text);
width:100%;
height:100%;
flex:1;
position: relative;
border-top: 1rem solid var(--color-bg);
// border-top: 1rem solid var(--color-bg);
margin-bottom:1rem;
white-space: normal;
text-align: center;
word-break: break-all;
@ -53,10 +58,10 @@
display: flex;
flex-direction: column;
justify-content: center;
box-shadow: 0 1rem 0 0 var(--color-light) inset;
box-shadow: 0 0 0 1rem var(--color-light) inset!important;
&:first-child {
border-top:0;
// border-top:0;
}
&:last-child {
@ -87,18 +92,17 @@
.switcher-container, .crossfader-container {
.label {
border-bottom: 1rem solid var(--color-bg);
}
.switcher {
width: 100%;
flex:1;
width:auto;
}
}
.crossfader-container {
.switcher {
display:flex;
margin: 1rem;
border: 1rem solid var(--color-bg);
&.horizontal {
flex-direction: column;
.switch {

View file

@ -2,7 +2,57 @@
width:100rem;
height: 60rem;
padding:0!important;
background: var(--color-light-fg);
--color-border:var(--color-bg);
z-index: 1;
.toggle {
background: var(--color-raised);
cursor: pointer;
flex:1;
display: flex;
.light {
flex:1;
display: flex;
box-shadow: 0 0 0 1rem var(--color-light) inset;
pointer-events: none;
&:after {
content:"";
opacity: 1;
position: absolute;
display: block;
top:3rem;
left:3rem;
right:3rem;
height: 4rem;
background: var(--color-track);
box-shadow: 0 0 0 1rem var(--color-light), 0 0 0 1rem var(--color-track) inset;
z-index: 1;
}
&:before {
content:"";
flex:1;
background: var(--color-custom);
opacity: 0;
}
}
&.on {
// background: var(--color-fg);
.light:after {
background: var(--color-custom);
}
}
}
> .label {
position: absolute;
@ -20,47 +70,7 @@
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
z-index: 2;
}
cursor: pointer;
> .light {
flex:1;
&:after {
content:"";
opacity: 1;
position: absolute;
display: block;
top:3rem;
left:3rem;
right:3rem;
border-top: 2rem solid var(--color-bg);
box-shadow: 0 1rem 0 0 var(--color-light), 0 1rem 0 0 var(--color-light);
z-index: 1;
opacity: .5;
}
&:before {
content:"";
width: 100%;
height: 100%;
position: absolute;
background: var(--color-custom);
opacity: 0;
}
&.on {
&:before {
opacity: .3;
}
&:after {
border-top-color: var(--color-custom);
box-shadow: none;
opacity: .7;
}
}
}
}