Hi Simon,

all I can see in your example is a naming conflict: "rolloverButton-css" (in 
Decoration.js) vs. "rolloverButton" (in your setDecorator call).
Apart from that you are on the right track, but don't forget to also define a 
custom appearance for your button.

Cheers,

  Norbert

----- Original Message -----
From: simonwh...@dciphercomputing.com
To: qooxdoo-devel@lists.sourceforge.net
Date: 21.01.2012 00:37:04
Subject: [qooxdoo-devel] Decorator Questions


> Hi
> 
> I would like to create a rollover decorator for buttons.  To test it I 
> modified the Decoration.js as follows and it works just fine but now all 
> my buttons are roll-over buttons.  I would like to refine this so that I 
> when the widget is being constructed I can choose to use the default 
> button decorator or the rollover button decorator.  So I tried renaming 
> the "button-css" to "rolloverButton-css" and
> "button-hovered-css" to ""rolloverButton-hovered-css" in the 
> Decoration.js and then used setDecorator("rolloverButton") but I get an 
> error saying that "rolloverButton" is invalid.
> 
> How should this be done?
> 
> Thanks,
> Simon
> 
> 
> 
> qx.Theme.define("kardpoll.theme.Decoration",
> {
>   extend : qx.theme.modern.Decoration,
> 
>   decorations :
>   {
>     /*
> 
> ---------------------------------------------------------------------------
>       PLAIN CSS BUTTON
> 
> ---------------------------------------------------------------------------
>     */
>     "button-css" :
>     {
>       decorator : [
>         qx.ui.decoration.MSingleBorder,
>         qx.ui.decoration.MLinearBackgroundGradient,
>         qx.ui.decoration.MBorderRadius
>       ],
> 
>       style :
>       {
>         radius: 3,
>         width: 0,
>         color: "border-button",
>         startColorPosition: 35,
>         endColorPosition: 100
>       }
>     },
> 
>     "button-hovered-css" :
>     {
>       include : "button-css",
>       style : {
>         width: 1,
>         startColor : "button-hovered-start",
>         endColor : "button-hovered-end"
>       }
>     }
> 
> 
>   }
> });
> 
> 
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel






------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to