fix padding for labels.

This commit is contained in:
Christopher Jeffrey 2015-07-22 04:38:27 -07:00
parent 600cb85909
commit bb83be4b47
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}