fix padding for labels.
This commit is contained in:
parent
600cb85909
commit
bb83be4b47
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue