- var cls = (this.cls || '');
- cls += (this.iconCls || this.icon) ? (this.text ? ' x-btn-text-icon' : ' x-btn-icon') : ' x-btn-noicon';
- if(this.pressed){
- cls += ' x-btn-pressed';
+ return [this.type, 'x-btn-' + this.scale + ' x-btn-icon-' + this.scale + '-' + this.iconAlign, this.getMenuClass(), this.cls, this.id];
+ },
+
+ // private
+ setButtonClass : function(){
+ if(this.useSetClass){
+ if(!Ext.isEmpty(this.oldCls)){
+ this.el.removeClass([this.oldCls, 'x-btn-pressed']);
+ }
+ this.oldCls = (this.iconCls || this.icon) ? (this.text ? 'x-btn-text-icon' : 'x-btn-icon') : 'x-btn-noicon';
+ this.el.addClass([this.oldCls, this.pressed ? 'x-btn-pressed' : null]);