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