Hello Dietrich,
I did that change to align the shadow handling with the decorator handling.
Decorators always had that behavior with the negative inset. Additionally, as
soon as the shadow element would have been resized, the insets were calculated
by the used decorator element itself which uses ofc. the decorator logic. Using
the same decorator description for as decorator and not as shadow leads to a
different behavior in < 2.0 which is not good.
The bug you referenced is exactly the right one which brought up the issues
with the shadow elements. If you want to reproduce it, got to the 2.0 widget
browser in the modern theme [1] and check out the invalid state of the forms
tab. Just hover a field on the left and after that one on the right. You will
see the negative used inset for the first error tooltip and the proper
calculated inset for the second error tooltip. (We also had positive insets for
the shadow element in the theme)
The consequence of the fix would be the solution you already posted, use
negative insets instead of the positive.
Regards,
Martin
[1]
http://demo.qooxdoo.org/2.0/widgetbrowser/index.html?qx.theme=qx.theme.Modern
Am 16.07.2012 um 11:23 schrieb Dietrich Streifert:
the "big" change seems to be
https://github.com/qooxdoo/qooxdoo/blob/master/framework/source/class/qx/ui/core/Widget.js#L2487
where elem.setStyles() now take insets.left and insets.top as positive
value whereas
https://github.com/qooxdoo/qooxdoo/blob/release_1_6_1/framework/source/class/qx/ui/core/Widget.js#L2469
are made negative before putting them to elem.setStyles().
So with the example inset for "shadow-window-inactive" I've changed the
insets from
insets : [ 4, 9, 12, 8 ]
to
insets : [ -4, 17, 16, -8 ]
This shows the top, left and bottom shadow as expected, but not the
right shadow.
Please have a look at the screenshot attached.
Regards.
Dietrich.
Am 16.07.2012 10:28, schrieb Dietrich Streifert:
Hello everybody and especially Martin Wittemann (and maybe John
Spackmann),
I'm using the aristo theme which worked well in qooxdoo 1.6.1
regarding the shadow decorator definitions, but does not show the
expected behaviour since some commits which changed inset shadow
handling in widget.js for qx 2.0/2.0.1 (and master 2.1). The changes
where done in order to fix positioning of the tooltips (see
http://bugzilla.qooxdoo.org/show_bug.cgi?id=6308)
The aristo theme uses decorators for shadows and form field focus
having not only a shadow at the south and east margin of windows, but
also on the other window sides. The focus indicator of fields (and the
invalid field indicator) is not a simple border, but a "shadow" which
shows a "glow" effect around the field.
Please have a look at
http://demo.qooxdoo.org/contrib/demobrowser/#Aristo~trunk%2Fdefault%2F1.6.1%2Findex.html
<http://demo.qooxdoo.org/contrib/demobrowser/#Aristo%7Etrunk%2Fdefault%2F1.6.1%2Findex.html>
and open eg. the Table showcase.
The definition in the decorations class file is like this:
"shadow-window-inactive" : {
decorator : qx.ui.decoration.Grid,
style : {
baseImage : "aristo/decoration/shadow/shadow-window.png",
insets : [ 4, 9, 12, 8 ]
}
},
which should show up with a 4px shadow decoration top, 9px right,
12px bottom and 8px left.
With the changes made on fixing bug #6308 this does not work anymore.
The shadow decorator is misplaced as if it allways starts the
decorator from left corner 0px,0px relative to the widget (eg. window)
top left corner. This ends up with visually having defined
"shadow-window-inactive" : {
decorator : qx.ui.decoration.Grid,
style : {
baseImage : "aristo/decoration/shadow/shadow-window.png",
insets : [ 0, 17, 16, 0 ]
}
},
So do I have to calculate with some negative insets?
More than that: How is the following decoration definition in the
qooxdoo 2 modern theme (master of today) supposed to be displayed:
"shadow-window" :
{
decorator : qx.ui.decoration.Grid,
style : {
baseImage : "decoration/shadow/shadow.png",
insets : [ 4, 8, 8, 4 ]
}
},
Should there be a shadow of 4px on the top and 4 px on the left? Or
did I completely missunderstood how Shadows are defined?
I don't know if screenshots appear on the mailing list, but I've
attached two screens showing the situation with qx-1-6-1 and qx-2-0-1.
So how can I get my shadows and glows back?
Thank you for your help.
Regards.
Dietrich.
<window-shadow-aristo-qx-2-0-1-negative-insets.png>------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel