PDA

View Full Version : [CLOSED] Make toolbar buttons look like regular buttons



jchau
Dec 01, 2015, 8:04 PM
How can I make all toolbar buttons look like regular buttons? I tried using the Standout property but the buttons loose their hover over effect.

Daniil
Dec 02, 2015, 6:03 PM
Hi @jchau,

This override does the job.


Ext.toolbar.Toolbar.override({
onBeforeAdd: function (component) {
var me = this;

if (component instanceof Ext.toolbar.Separator) {
component.setUI((me.vertical) ? 'vertical' : 'horizontal');
}

me.callSuper(arguments);
}
});

The original onBeforeAdd is here (http://docs.sencha.com/extjs/4.2.1/source/Toolbar.html#Ext-toolbar-Toolbar-method-onBeforeAdd).