|
|
|
@ -42,16 +42,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.Button.superclass._init.apply(this, arguments); |
|
|
|
|
var o = this.options, self = this; |
|
|
|
|
if (BI.isNumber(o.height) && !o.clear && !o.block) { |
|
|
|
|
this.element.css({ |
|
|
|
|
height: o.height / BI.pixRatio + BI.pixUnit, |
|
|
|
|
lineHeight: (o.height - 2) / BI.pixRatio + BI.pixUnit |
|
|
|
|
}); |
|
|
|
|
} else if (o.clear || o.block) { |
|
|
|
|
this.element.css({lineHeight: o.height / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
} else { |
|
|
|
|
this.element.css({lineHeight: (o.height - 2) / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
} |
|
|
|
|
if (BI.isKey(o.iconCls)) { |
|
|
|
|
this.icon = BI.createWidget({ |
|
|
|
|
type: "bi.icon_label", |
|
|
|
@ -83,7 +73,7 @@ BI.Button = BI.inherit(BI.BasicButton, {
|
|
|
|
|
} else { |
|
|
|
|
this.text = BI.createWidget({ |
|
|
|
|
type: "bi.label", |
|
|
|
|
height: o.height - 2, |
|
|
|
|
height: o.height, |
|
|
|
|
textAlign: o.textAlign, |
|
|
|
|
whiteSpace: o.whiteSpace, |
|
|
|
|
textWidth: o.textWidth, |
|
|
|
@ -99,6 +89,16 @@ BI.Button = BI.inherit(BI.BasicButton, {
|
|
|
|
|
value: o.value |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (BI.isNumber(o.height) && !o.clear && !o.block) { |
|
|
|
|
this.element.css({ |
|
|
|
|
height: o.height / BI.pixRatio + BI.pixUnit, |
|
|
|
|
lineHeight: (o.height - 2) / BI.pixRatio + BI.pixUnit |
|
|
|
|
}); |
|
|
|
|
} else if (o.clear || o.block) { |
|
|
|
|
this.element.css({lineHeight: o.height / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
} else { |
|
|
|
|
this.element.css({lineHeight: (o.height - 2) / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
} |
|
|
|
|
if (o.block === true) { |
|
|
|
|
this.element.addClass("block"); |
|
|
|
|
} |
|
|
|
|