View Full Version : Gray buttons in Neptune theme

28 Feb 2014, 5:09 AM
Hi, is it possible to programmatically change the color of some TextButtons and ToggleButtons (in the Neptune theme) from blue to gray? For example, when I add a button to a ToolBar it changes the color to gray, but is it possible to do so without ToolBar?

There are places in my app where gray ones look much better (in the other places I would like to leave blue ones).


Colin Alworth
28 Feb 2014, 9:03 AM
The effect is achieved by letting the button CSS be slightly different in different cases. When ever the button is in a parent element with css class x-toolbar-mark, the generated button appearances use properties from the theme.details.toolbar.buttonOverride property instead of the standard theme.details.button property. If you were writing up your own theme config, you could use this to make toolbar buttons slightly different than other buttons.

It is also possible to add the x-toolbar-mark css class to the parent element of buttons to make them adopt this alternate set of styles. We are doing this in the hbox and vbox examples - you can see the css class added in the source at http://www.sencha.com/examples/#ExamplePlace:vboxlayout.

2 Mar 2014, 1:56 AM