mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
WS: Add strip labels in the mixer demo
Plus some minor widget code and layout improvements
This commit is contained in:
parent
c8bc9a25b3
commit
0b71764f44
4 changed files with 54 additions and 27 deletions
|
|
@ -17,10 +17,40 @@
|
|||
*/
|
||||
|
||||
import loadToolkit from './tkloader.js';
|
||||
import { BaseContainer, BaseControl } from './widget.js';
|
||||
import { BaseWidget, BaseContainer, BaseControl } from './widget.js';
|
||||
|
||||
class Widget extends BaseWidget {
|
||||
|
||||
constructor (tk) {
|
||||
super();
|
||||
this.tk = tk;
|
||||
}
|
||||
|
||||
get element () {
|
||||
return this.tk.element;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class Label extends Widget {
|
||||
|
||||
constructor () {
|
||||
super(new TK.Label());
|
||||
}
|
||||
|
||||
set text (text) {
|
||||
this.tk.set('label', text);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Control extends BaseControl {
|
||||
|
||||
constructor (tk) {
|
||||
super();
|
||||
this.tk = tk;
|
||||
}
|
||||
|
||||
get element () {
|
||||
return this.tk.element;
|
||||
}
|
||||
|
|
@ -30,7 +60,7 @@ class Control extends BaseControl {
|
|||
class RangeControl extends Control {
|
||||
|
||||
constructor (tk) {
|
||||
super();
|
||||
super(tk);
|
||||
|
||||
this.tk = tk;
|
||||
this.lastValue = NaN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue