Looking at qx.ui.core.Widget._applyShadow(), when the shadow decorator is
exchanged any insets provided by the previous shadow decorator are removed
from the width and height of the shadow; but as the insets are now specified
as negative there is no need to reverse them.  At least, that's what I
*think* is happening.  I've added a a bug report with  pull request
http://bugs.qooxdoo.org/show_bug.cgi?id=6927

There isn't a test case in the pull request because I don't know where to
put one (or how to test for it) - please say where/what to do if you'd like
it updated.

John

From:  John Spackman <[email protected]>
Reply-To:  qooxdoo Development <[email protected]>
Date:  Wednesday, 24 October 2012 12:11
To:  qooxdoo Development <[email protected]>
Subject:  [qooxdoo-devel] Problems with insets on Qx 2.x when decorator
changes

I'm trying to update the Aristo theme to 2.x to use negative insets
(following on from Detrich's conversation "[qooxdoo-devel] problems with
shadow decorators and insets in qx 2.0 and master (qx 2.1)"); this works
fine, except where I select a different Decorator depending on whether
states.focused is set, and the two decorators have different insets.
Everything looks fine until I cause  the decorator to change (in this case
click to change the active window) after which *both* decorators are inset
on the bottom and right hand sides by quite a lot.

These are my decorators:
                "shadow-window-inactive" : {
                        decorator : qx.ui.decoration.Grid,

                        style : {
                                baseImage :
"aristo/decoration/shadow/shadow-window.png",
                                insets : [ -6, 18, 20, -6 ]
                        }
                },

                "shadow-window-active" : {
                        decorator : qx.ui.decoration.Grid,

                        style : {
                                baseImage :
"aristo/decoration/shadow/shadow-window-active.png",
                                insets : [ -8, 26, 28, -8 ]
                        }
                },

And appearance:
                "window" : {
                        style : function(states) {
                                return {
                                        shadow : states.focused?
"shadow-window-inactive" : "shadow-window-active",
                                        contentPadding : [ 10, 10, 10, 10 ]
                                };
                        }
                },

This works fine on 1.6.1.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to