panel/strip: add "border" option
This commit is contained in:
parent
d807032ace
commit
e1b32987d5
5 changed files with 25 additions and 5 deletions
|
|
@ -9,7 +9,7 @@
|
|||
- meter: added `alignRight` option; added `dashed` option;
|
||||
- knob: removed `compact` option; added `dashed` option; added `input` option;
|
||||
- xy/rgb: added `input` option; added `pips` option:
|
||||
- panel: removed inner widgets dark borders
|
||||
- panel/strip: removed inner widgets dark borders; added `border` option;
|
||||
- buttons: new `dropdown` widget;
|
||||
- toggle: added `led` option to choose between the old appearance and the new one
|
||||
- new `input` widget
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ Panels can contains tabs or widgets. These can be absolutely positioned and can
|
|||
- default: `true`
|
||||
- usage: set to `false` to disable scrollbars
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: by default, widgets in panels/strip have their border disabled, except for panels and strips. Set to `false` to apply this rule to the panel too.
|
||||
|
||||
### `widgets`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
|
|
@ -77,6 +82,11 @@ Unidirectionnal panel with stretching capability. By default, children widgets t
|
|||
- default: `false`
|
||||
- usage: set to `true` to stretch widgets evenly
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: by default, widgets in panels/strip have their border disabled, except for panels and strips. Set to `false` to apply this rule to the strip too.
|
||||
|
||||
### `widgets`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ module.exports = class Panel extends _widgets_base {
|
|||
color:'auto',
|
||||
css:'',
|
||||
|
||||
_layout:'layout',
|
||||
_layout:'panel',
|
||||
|
||||
border:true,
|
||||
layout:'',
|
||||
spacing:0,
|
||||
|
||||
|
||||
|
||||
_osc:'osc',
|
||||
|
||||
value:'',
|
||||
|
|
@ -55,7 +55,8 @@ module.exports = class Panel extends _widgets_base {
|
|||
|
||||
super({...options, html: '<div class="panel"></div>'})
|
||||
|
||||
if (!this.getProp('scroll')) this.widget.addClass('noscroll')
|
||||
if (this.getProp('scroll') === false) this.widget.addClass('noscroll')
|
||||
if (this.getProp('border') === false) this.container.addClass('noborder')
|
||||
if (this.getProp('tabs') && this.getProp('tabs').length) this.widget.addClass('has-tabs')
|
||||
|
||||
|
||||
|
|
@ -191,7 +192,7 @@ module.exports = class Panel extends _widgets_base {
|
|||
$(window).resize()
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.navigation.find('li').removeClass('on').eq(v).addClass('on')
|
||||
|
||||
if (options.send) this.sendValue()
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ module.exports = class Strip extends Panel {
|
|||
|
||||
horizontal:false,
|
||||
stretch:false,
|
||||
border:true,
|
||||
spacing:0,
|
||||
|
||||
_children:'children',
|
||||
|
|
|
|||
|
|
@ -84,6 +84,14 @@
|
|||
|
||||
}
|
||||
|
||||
&.noborder {
|
||||
|
||||
--color-border: var(--color-fg);
|
||||
> .panel {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue