PDA

View Full Version : How to change color of a toolbar with the cls config ?



Elfayer
5 Jul 2012, 6:00 AM
Hi,

I've been searching all the day how to do that. Here i am :

JS :

Ext.define('DSK.view.desktop.Taskbar', {
extend: 'Ext.toolbar.Toolbar',
alias: 'widget.taskbar',
cls: 'taskbar',
items: [
{
text: 'Start'
}
]
});

CSS :


.taskbar
{
background-color:#00CBFF;
}

friend
5 Jul 2012, 6:13 AM
This works:



{
xtype: 'toolbar',
style: {
background: 'red'
},
<...>
}

Izhaki
5 Jul 2012, 6:17 AM
Should work:



.taskbar.x-toolbar{
background-color: #00CBFF;
}

Elfayer
5 Jul 2012, 6:20 AM
friend : Thanks a lot =) And that's working with hexa !

Otherwise, how can i change the border color or make a degraded on the toolbar, with that method ?

Izhaki : But it don't on here.. (EDIT : Need to put "! important" after every CSS line.
ex : background: #7FD4FF !important;)