diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index 11701e4b2..c92d15390 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -329,6 +329,7 @@ var PadDiagram = GObject.registerClass({ this._imagePath = imagePath; this._handle = this._composeStyledDiagram(); + this._initLabels(); } // eslint-disable-next-line camelcase @@ -343,6 +344,33 @@ var PadDiagram = GObject.registerClass({ this.add_actor(actor); } + _initLabels() { + // FIXME: Fix num buttons. + let i = 0; + for (i = 0; i < 50; i++) { + let [found] = this.getButtonLabelCoords(i); + if (!found) + break; + this._addLabel(Meta.PadActionType.BUTTON, i); + } + + for (i = 0; i < 2; i++) { + let [found] = this.getRingLabelCoords(i, CW); + if (!found) + break; + this._addLabel(Meta.PadActionType.RING, i, CW); + this._addLabel(Meta.PadActionType.RING, i, CCW); + } + + for (i = 0; i < 2; i++) { + let [found] = this.getStripLabelCoords(i, UP); + if (!found) + break; + this._addLabel(Meta.PadActionType.STRIP, i, UP); + this._addLabel(Meta.PadActionType.STRIP, i, DOWN); + } + } + _wrappingSvgHeader() { return '' + '