From bb83be4b47c2aa1952153f487652edd91a6ebc19 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 22 Jul 2015 04:38:27 -0700 Subject: [PATCH] fix padding for labels. --- lib/widgets/element.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/widgets/element.js b/lib/widgets/element.js index 803f037..1a50a0c 100644 --- a/lib/widgets/element.js +++ b/lib/widgets/element.js @@ -940,16 +940,16 @@ Element.prototype.setLabel = function(options) { screen: this.screen, parent: this, content: options.text, - top: this.border ? -1 : 0, + top: -this.itop, tags: this.parseTags, shrink: true, style: this.style.label }); if (options.side !== 'right') { - this._label.rleft = 2 + (this.border ? -1 : 0); + this._label.rleft = 2 - this.ileft; } else { - this._label.rright = 2 + (this.border ? -1 : 0); + this._label.rright = 2 - this.iright; } this._label._isLabel = true; @@ -965,7 +965,7 @@ Element.prototype.setLabel = function(options) { var reposition = function() { var visible = self.height - self.iheight; - self._label.rtop = (self.childBase || 0) - (self.border ? 1 : 0); + self._label.rtop = (self.childBase || 0) - self.itop; if (!self.screen.autoPadding) { self._label.rtop = (self.childBase || 0); }