jbadeau wrote:
> I am trying to replace the little arrow in the 'toolbar-menubutton' widget in
> my 'Intranet' theme which extends the 'Modern' theme but an unable to do so.
>
I suggest setting up an own appearance theme (if you haven't already
done so), and register this with your meta theme. Then, just add a key
for the appearance item you want to see changed:
/*
#asset(my/toolbar/arrow.png)
*/
qx.Theme.define("my.theme.Appearance",
{
extend : qx.theme.modern.Appearance,
appearances :
{
"toolbar-menubutton/arrow" :
{
alias : "image",
include : "image",
style : function(states)
{
return {
source : "my/toolbar/arrow.png"
};
}
},
...
}
}
Where the Modern theme returns "decoration/arrows/down-small.png", you
are now returning your own image. That's basically it. See here for more
info: http://qooxdoo.org/documentation/0.8/ui_custom_themes.
> I have seen the 'decoration/arrows/down-small.png' is actually a clip region
> from the 'qx\decoration\Modern\arrows-combined.png'.
>
> I have seen that the clipping is defined in a script under the var
> 'qx.$$resources = {...}'
> I would assume this was generated from the arrows-combined.meta file which
> specifies the clipping regions.
>
That's right. but you shouldn't bother about it (see further).
> So if I have generated a new 'arrows-combined.png' how to I tell my theme to
> use my theme's arrow and not the Modern?
>
You do it as described above, by overriding the appearance key in your
custom theme. You never need to concern yourself with creating clipped
images, this is just a "trick" to save net requests for the running app.
You can leave the clipped images of the framework as they are. Because
it's not about changing the image store, but changing the theme that
makes the difference. Just make sure your own image is also declared in
the #asset declaration at the top of your theme, and is available as a
file under your app's .../source/resource/my/toolbar/arrow.png.
Everything else should then work out fine.
HTH,
T.
------------------------------------------------------------------------------
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