diff --git a/data/theme/pad-osd.css b/data/theme/pad-osd.css index 31c237722..e0c904847 100644 --- a/data/theme/pad-osd.css +++ b/data/theme/pad-osd.css @@ -19,7 +19,6 @@ .Label { stroke: none !important; stroke-width: .1 !important; - font-size: .1 !important; fill: transparent !important; } diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index d0cbbe0e2..e1e24f70c 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -485,23 +485,23 @@ var PadDiagram = GObject.registerClass({ if (this._handle == null) return [false]; - let leaderPos, leaderSize, pos; - let found, direction; - - [found, pos] = this._handle.get_position_sub(`#${labelName}`); - if (!found) + const [labelFound, labelPos] = this._handle.get_position_sub(`#${labelName}`); + const [, labelSize] = this._handle.get_dimensions_sub(`#${labelName}`); + if (!labelFound) return [false]; - [found, leaderPos] = this._handle.get_position_sub(`#${leaderName}`); - [found, leaderSize] = this._handle.get_dimensions_sub(`#${leaderName}`); - if (!found) + const [leaderFound, leaderPos] = this._handle.get_position_sub(`#${leaderName}`); + const [, leaderSize] = this._handle.get_dimensions_sub(`#${leaderName}`); + if (!leaderFound) return [false]; - if (pos.x > leaderPos.x + leaderSize.width) + let direction; + if (labelPos.x > leaderPos.x + leaderSize.width) direction = LTR; else direction = RTL; + let pos = {x: labelPos.x, y: labelPos.y + labelSize.height}; if (this.leftHanded) { direction = 1 - direction; pos.x = this._imageWidth - pos.x;