Hi,

I'm trying to create toolbar buttons that use a custom appearance ­ which
works fine except it screws up the appearance of other toolbar buttons that
do not have the custom appearance.  My appearance is defined with
"include"="toolbar-button" but it seems to screw up the appearance for
standard toolbar buttons.

I don't think I can create a playground example because I need a custom
theme to illustrate the point, so here's as small an example as I could make
it:

1. Create a new application with create-application.py
2. Edit Application.js to put this code below the "Below is your application
code" comment:
var cpanel = new qx.ui.container.Composite(new qx.ui.layout.VBox());

var tb = new qx.ui.toolbar.ToolBar();

var btn;

btn = new qx.ui.toolbar.CheckBox("test", "xxx/test.png");

btn.set({ appearance: "mce-toolbar-button" });

tb.add(btn);

cpanel.add(tb);

var tb = new qx.ui.toolbar.ToolBar();

cpanel.add(tb);

tb.add(new qx.ui.toolbar.Button("Refresh"));

tb.add(new qx.ui.toolbar.Button("Create"));

      // Document is the application root

      var doc = this.getRoot();



      // Add button to document at fixed coordinates

      doc.add(cpanel, {left: 100, top: 50});


3. Edit theme/*.js to change the "extend" key to be qx.theme.simple.*
instead of qx.theme.modern.*

4. Add this key to theme/Appearance.js:
    "mce-toolbar-button": {

    include: "toolbar-button",

    style: function(states, style) {

    style.margin = [2, 0];

    return style;

    }

    }


To reproduce the problem, hover the mouse over the "refresh" or "create"
buttons and you'll see the button's margin increase while hovering over it.
If you comment out CheckBox with the custom appearance, the refresh and
create buttons have correct margins (i.e. the same margin as when hovering).

Is this a bug or am I doing something wrong?

Thanks
John




------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to