Hello,

I have some problems migrating my custom theme with custom decorators to 
qooxdoo 3.0. I hope someone can clarify the following points. I’m referring to 
the migration guide on 
http://manual.qooxdoo.org/3.0/pages/desktop/migration/migration_from_2_x.html.
Sounds good. How did the guid work for you thus far?


1. The guide says “The decorator theme key will be ignored” and 
“qx.ui.decoration.DynamicDecorator has been deprecated. Replace it with 
decoration.Decorator.”

I saw that there are some differences between the two classes, most notably the 
fact that the new class includes all the basic decoration mixins that ship with 
qooxdoo (MBackgroundColor, MBorderRadius, MBoxShadow, MDoubleBorder, 
MLinearBackgroundGradient and MBorderImage).

The way I understand the workings of 2.1 decorators is that if use an array as 
the value of the `decorator` key in one of my theme’s `decorations`, the theme 
will instanciate a DynamicDecorator and mix in all the mixins i specify in said 
array. So I assume in 3.0 the instance will be of type 
qx.ui.decoration.Decorator instead. But if the decorator theme key is ignored, 
where do I specify my custom decorator mixins? If these are still supported, 
that is…
Sure, thats still supported, even that I didn't think that anyone has even 
written a custom decorator mixin. ;) You can 'patch' the Decorator class and 
add your own mixin to the existing class. Simply use qx.Class.patch for that 
and your custom mixin is available.

Also (assuming they are supported), does that mean the code of the default 
mixins will run even I don’t want them to, possibly causing side-effects (if 
they use the same CSS properties in `getStyles`, for example)? If they’re 
unsupported, what is the suggested route for adding/overriding CSS styles?
Yes, they are running as soon as the necessary properties are set (e.g. 
shadowLength for the box shadow). If mixins use the same CSS properties, they 
have to be careful not overriding each other.


2. There is a quick mention that “The inset properties of the decorators have 
been set to read-only.” without explaining what the `inset` property is for. I 
only know of one `inset` property. It is used by the MBoxShadow mixin to decide 
whether a box shadow should be drawn inside or outside the box onto which it is 
applied. I’m pretty sure this behaviour cannot be “replaced with the 
corresponding padding and/or margin in the appearance theme” as suggested in 
the guide.

Well, thats not the inset the doc speaks of. Every decorator had inset 
properties [1] for the distance between the decorator and the content (more or 
less). If you have never heard of these insets, it should not bother you.

Regards,
Martin

[1] http://demo.qooxdoo.org/2.1/apiviewer/#qx.ui.decoration.Abstract~insetBottom
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to