Hi Siarhei,
I'm taking this back to the mailing list.
> My main question following: If I would like to use icons shipped with
> qooxdoo sdk,
> what is the best way to do this? There are several options described
> in documentation [1].
> So, the last one is similar to which I used in 0.7 and I decided to
> try it first.
>
> What I did:
> 1) Created test application and add one more button:
> var button2 = new qx.ui.form.Button("First2 Button",
> "icon/16/apps/utilities-dictionary.png");
>
> 2) Added asset
> #asset(icon/${qx.icontheme}/16/apps/utilities-dictionary.png)
This is not enough currently. You have to give the whole path after the
"resource" directory of the library, so in this case:
#asset(qx/icon/${qx.icontheme}/16/apps/utilities-dictionary.png)
I've corrected this in the wiki.
>
> 3) Made source and opened in a browser
> It worked like a charm with Tango icon.
If you working against trunk this might work since the asset macro
"qx.icontheme" has now a pre-defined value (since recently). In general
you should always add a "themes" key to your config when you deploy
asset macros.
> So, generator expected array for QXICONTHEME (it seems that is a
> mistake in docs [1] in the last config). Ok, I changed to
>
> "QXICONTHEME" : ["Oxygen"]
Yes, you have to use a list value, even for a single element in it. I've
corrected [1]. Please always check against [3], which is supposed to be
the authoritative reference :).
>
> Now resource list was correct custom2.Application: [u'custom2/.*',
> u'icon/Oxygen/16/apps/utilities-dictionary.png'] but there wasn't an
> image
> on the page. But I found following line in trace:
>
> - Analysing image:
> /Users/siarheibarysiuk/Documents/os/qooxdoo-trunk/framework/source/resource/qx/icon/Oxygen/16/apps/utilities-dictionary.png
>
> So, this link seemed correct. But the page tried to load image from
> the same path as in previous case:
> path_to_project/source/qx/icon/Tango/16/apps/utilities-dictionary.png
See above.
>
> When I changed "QXTHEME" to "qx.theme.Classic" (it seems that this
> theme uses Oxygen) it worked. Probably
> QXICONTHEME doesn't affect it at all.
This is more of a strange effect.
>
> So, my question how to use different icon themes shipped with qooxdoo
> and is it possible to configure it in configuration?
Yes, the wiki page [1] gives a good account, and now that it is
corrected it should work. If you are using 0.8 you can still use the
third method with asset macros, but you have to make sure that you have
a corresponding "themes" key in place (e.g. with the "compile-*" jobs)
so the macro is properly replaced. It is just a (list-valued) string
expansion, so there is no magic about it. See [2]
> That's the first question. Also in documentation said that
> ${qx.icontheme} could be changed or removed. I'm writing qxtransformer
> support for 0.8 version and I want to automatically handle all icons
> in application and generate asset structures. What is
> the best way to do it? With ${qx.icontheme} or user should define them
> explicitly?
I'm not familiar enough with qxtransformer to judge that. If you are
generating the #asset directives anyway, you could generate literal path
expressions, giving the theme explicitly. If you want the generated
application to retain some flexibility you would use asset macros and
make the corresponding "themes" key entries. [2] should give you a good
impression what they give you.
Thomas
> [1]
> http://qooxdoo.org/documentation/0.8/ui_resources?s=resources#using_qooxdoo_icons_with_widgets
>
>
[2]
http://qooxdoo.org/documentation/0.8/generator_config_articles#themes_key
[3]
http://qooxdoo.org/documentation/0.8/generator_config_ref
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel