Hello everyone,

I am trying to theme a qx.ui.form.Button. My scenario is the following: in
my widget i have a childcontrol "myId" wich is a qx.ui.from.Button. Styling
my button in the appearance theme of my application works so far (I want to
create a button looking like a plain link). Here is the sample code:

qx.Theme.define("myapp.theme.Appearance",
{
  extend : qx.theme.modern.Appearance,

  appearances :
  {
    "button-minimalistic" :
    {
      alias : "button",

      style : function(states)
      {
        var font = undefined;
        var textColor = undefined;
        var cursor = undefined;

        if (states.disabled)
        {
          textColor = "text-disabled";
        }
        else if (states.hovered)
        {
          font = "bold";
          cursor = "pointer";
        }

        return {
          font : font,
          cursor : cursor,
          textColor : textColor
        }
      }
    },

    "mywidget" : "widget",
    "mywidget/myId" : "button-minimalistic"
  }
}

The code above is working as expected. But when i add the following line to
the returned object of the style function, then my application does not load
any more:

        return {
          font : font,
          cursor : cursor,
          textColor : textColor,
          show : "label"
        }

Calling setShow("label") on the "myId" child control (button) works in my
application code. I don't know if i did something wrong (themeing is very
cool, but complex and i don't think I have understood it completely) or a
bug.


Regards, Florian
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to