Hi Petr,
Petr Kobalíček wrote:
> Sorry, I submited it too early:)
>
> Question is, is this possible and how the generator will interpret it ?
Theme classes have no dependencies to other classes than theirselves. So
the generator only interpret/detect the theme because it is set with the
setting "qx.theme" (= QXTHEME macro).
I guess you have to add manually the includes for the several theme
classes. And by the way: theme switching is not supported at runtime, so
the color theme as to be set at loading time.
See my additional comments below.
> 2008/12/1 Petr Kobalíček <[EMAIL PROTECTED]>:
>> Hi list,
>>
>> how is correct way to create color variants for some theme. For
>> example I'm playing with new theme and I want to create two or three
>> color variants.
>>
>> There are several parts (called meta themes in qooxdoo?) of theme that
>> must be overriden:
>> - Colors - this is simplest and shortest, just fill different values
The Color theme defines the different color values. The keys can be used
throughout the whole application and - most useful - within every other
theme class.
>> - Decorations - I think that in this part I will duplicate everything
I guess you mean by "duplicate everything" change the different
decorations slightly, right? If you simply want to use them as is you
can also include the existing decoration theme in your meta theme.
>> - Appearance - I think that this is not needed to override, it uses
>> Colors and Decorators
Yes, as long as you do not want to change the appearance of the widgets
you can set aside this one.
>> Because I'm lazy in duplicating stuff, my idea is this:
>>
>> (function(){
>>
>> // list of theme descriptions
>> var description = [
>> // individual items
>> {
>> name: "Blue",
>> colors: { ... } // colors
>> resource: "path_for_resources"
>> }
>> ];
>>
>> description.forEach(item, function(){
>> qx.Theme.define("bfly.theme.light." + item.name,
>> {
>> colors: item.colors
>> });
>>
>> qx.Theme.define("bfly.theme.light." + item.name,
>> {
>> resource : item.resource,
>>
>> ...
>> });
>>
>> });
>>
>> }());
I think this won't work for two reasons:
* the name of themes is known at runtime - no possibilty for the
generator to include the classes automatically
* even if the generator would know them (by manual includes) you can
use the themes because you have to set the themes at loading time.
I hope I could help you further :)
cheers,
Alex
-------------------------------------------------------------------------
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