Hi Skar,
> I followed the same way for setting different color to a 
> "qx.ui.toolbar.Button". The root for this is "toolbar-button". It has 
> the following entry in qx/theme/modern/Appearance.js:
>
>   
perfect, that's the right way.
>> "toolbar-button" :
>>     {
>>       alias : "atom",
>>
>>       style : function(states)
>>       {
>>         return {
>>           marginTop : 2,
>>           marginBottom : 2,
>>           padding : (states.pressed || states.checked || 
>> states.hovered) && !states.disabled
>>                     || (states.disabled && states.checked) ? 3 : 5,
>>           decorator : states.pressed || (states.checked && 
>> !states.hovered) || (states.checked && states.disabled) ?
>>                         "toolbar-button-checked" :
>>                       states.hovered && !states.disabled ?
>>                         "toolbar-button-hovered" : undefined
>>         };
>>       }
>>     },
>>     
> And Color.js has no mention of "toolbar-button". How do I change the 
> color/gradient for the buttons in their base state, when hovered and 
> when pushed/down?
>
> cheers,
> skar.
>
>   
The color is set with the decoration "toolbar-button-checked" or 
"toolbar-button-hovered" (dependent on his state). To override the 
color, you have to override the complete decoration:
qx.Theme.define("custom.theme.Decoration",
{
  extend : qx.theme.modern.Decoration,

  decorations :
  {
    "toolbar-button-checked" :
    {
      decorator : qx.ui.decoration.Beveled,

      style :
      {
        outerColor : "#b6b6b6",
        innerColor : "#f8f8f8",
        backgroundImage : "decoration/form/button-checked-c.png",
        backgroundRepeat : "scale"
      }
    }
  }
});
You find the decorator definitions from the framework in the 
qx/theme/modern/Decoration.js file. I think the best way to is to search 
after the decorator keys and copy them to your decoration definition and 
change the color there.

Cheers,
Chris

-- 
Christian Schmidt
Software Entwickler

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
[email protected]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver 
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to