problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

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.





------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

window-shadow-aristo-qx-1-6-1.png (32K) Download Attachment
window-shadow-aristo-qx-2-0-1.png (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

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.
>
>
>
>


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

window-shadow-aristo-qx-2-0-1-negative-insets.png (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

MartinWittemann
Administrator
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




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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

Dietrich Streifert
Hello Martin,

thank you for your answer. But I have to insist that something is wrong
with the shadow decorator.

Why does the change of the window shadow inset from

     insets : [ 4, 9, 12, 8 ]

to

     insets : [ -4, 17, 16, -8 ]

not show up with the correct right shadow? No matter which value I'm
defining for the right inset nothing shows up at the right side of the
window.

And maybe this is a difference between CSS and image clipping based grid
decorators. Please have a look to your  link to the widgetbrowser below
using Internet Explorer 9 which does not use CSS decorators by my knowledge:

Open the "Window"-Tab in

http://demo.qooxdoo.org/2.0.1/widgetbrowser/index.html?qx.theme=qx.theme.Modern

and afterwards (here the "Window"-Tab as well) and compare

http://demo.qooxdoo.org/2.0/widgetbrowser/index.html?qx.theme=qx.theme.Modern

In the qx 2.0 case notice that the window has a small 4px shadow at the
top and left side of the window.

In the qx 2.0.1 case the whole shadow is shifted to the right.

The decoration definition has

             insets    : [ 4, 8, 8, 4 ]

So this also breaks modern theme.

And because the aristo theme uses non CSS decorators for all browsers
this is maybe what the problem causes.

Regards.
Dietrich.


Am 16.07.2012 11:39, schrieb Martin Wittemann:

> 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
>
>
>


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

MartinWittemann
Administrator
Hey,
thank you for your answer. But I have to insist that something is wrong
with the shadow decorator.

Why does the change of the window shadow inset from

    insets : [ 4, 9, 12, 8 ]

to

    insets : [ -4, 17, 16, -8 ]

not show up with the correct right shadow? No matter which value I'm
defining for the right inset nothing shows up at the right side of the
window.
Puh, good questions. Can't say much about it without a sample to see whats really going on.

And maybe this is a difference between CSS and image clipping based grid
decorators.
No, they usually use the same inset calculation. But this does not mean that there can not be a bug in one of the decorators which is not there in the other.

Please have a look to your  link to the widgetbrowser below
using Internet Explorer 9 which does not use CSS decorators by my knowledge:

Open the "Window"-Tab in

http://demo.qooxdoo.org/2.0.1/widgetbrowser/index.html?qx.theme=qx.theme.Modern

and afterwards (here the "Window"-Tab as well) and compare

http://demo.qooxdoo.org/2.0/widgetbrowser/index.html?qx.theme=qx.theme.Modern

In the qx 2.0 case notice that the window has a small 4px shadow at the
top and left side of the window.

In the qx 2.0.1 case the whole shadow is shifted to the right.

The decoration definition has

            insets    : [ 4, 8, 8, 4 ]

So this also breaks modern theme.
Thats a bug in the theme. Seems like I have missed to change that. I opened one with your description:

And because the aristo theme uses non CSS decorators for all browsers
this is maybe what the problem causes.
Do you still have problems even when you change the inset for the shadows?

Regards,
Martin

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

Dietrich Streifert
Am 16.07.2012 13:01, schrieb Martin Wittemann:
> Do you still have problems even when you change the inset for the shadows?
It's working, but seems kind of not consistent behaviour and much uglier
to handle.

Here is the whole story. I've simplified the insets to one value. The
goal was to have a shadow of 10px on each window side.

In image.json I've defined the following clipping job:

"${RESPATH}/visionet/source/decoration/shadow/shadow-window-active.png" :
           {
             "prefix" : "../../../decoration/shadow/shadow-window-active",
             "border-width" : [ 10, 10, 10, 10 ]
           },

and the following combine job:

"${RESPATH}/visionet/decoration/shadow-window-active-tb-combined.png":
           {
             "prefix" : [ "${RESPATH}" ],
             "input"  :
             [
               {
                 "prefix" : [ "${RESPATH}" ],
                 "files"  :
                 [
"${RESPATH}/visionet/decoration/shadow/shadow-window-active-[tb]*.png"
                 ]
               }
             ],
             "layout" : "vertical"
           },

"${RESPATH}/visionet/decoration/shadow-window-active-lr-combined.png":
           {
             "prefix" : [ "${RESPATH}" ],
             "input"  :
             [
               {
                 "prefix" : [ "${RESPATH}" ],
                 "files"  :
                 [
"${RESPATH}/visionet/decoration/shadow/shadow-window-active-[lr].png"
                 ]
               }
             ],
             "layout" : "horizontal"
           },

In Decoration.js the corresponding shadow decorators for qx 1.6 is
defined as:

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

       style : {
         baseImage : "visionet/decoration/shadow/shadow-window-active.png",
         insets : [ 10, 10, 10, 10 ]
       }
     },

With qx 2.0.1 (and 2.1) I have to write the following to get the same
result:

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

       style : {
         baseImage : "visionet/decoration/shadow/shadow-window-active.png",
         insets : [ -10, 30, 30, -10 ]
       }
     },

Prior to version 2.0 the job was simple: use the same dimensions in the
clipping job as in the decorator declaration.
Now, if I want to have this working I have to perform some calculations
with regard to the inner logic of widget::_applyShadow.

If you have a lot of borders, shadows (for different widget states) this
ends up in a lot of manual work which has to be done for the correct
decorations to be displayed.

Regards.
Dietrich.






------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

MartinWittemann
Administrator
Hey,
I see the problem but thats nothing new. If you would have used the images for decorators instead of shadows, you would have already had that. So I think its better to have the same behavior for shadow and decorator all the time, not only after a resize of the shadow.
Regards,
Martin


Am 16.07.2012 um 13:52 schrieb Dietrich Streifert:

> Am 16.07.2012 13:01, schrieb Martin Wittemann:
>> Do you still have problems even when you change the inset for the shadows?
> It's working, but seems kind of not consistent behaviour and much uglier
> to handle.
>
> Here is the whole story. I've simplified the insets to one value. The
> goal was to have a shadow of 10px on each window side.
>
> In image.json I've defined the following clipping job:
>
> "${RESPATH}/visionet/source/decoration/shadow/shadow-window-active.png" :
>           {
>             "prefix" : "../../../decoration/shadow/shadow-window-active",
>             "border-width" : [ 10, 10, 10, 10 ]
>           },
>
> and the following combine job:
>
> "${RESPATH}/visionet/decoration/shadow-window-active-tb-combined.png":
>           {
>             "prefix" : [ "${RESPATH}" ],
>             "input"  :
>             [
>               {
>                 "prefix" : [ "${RESPATH}" ],
>                 "files"  :
>                 [
> "${RESPATH}/visionet/decoration/shadow/shadow-window-active-[tb]*.png"
>                 ]
>               }
>             ],
>             "layout" : "vertical"
>           },
>
> "${RESPATH}/visionet/decoration/shadow-window-active-lr-combined.png":
>           {
>             "prefix" : [ "${RESPATH}" ],
>             "input"  :
>             [
>               {
>                 "prefix" : [ "${RESPATH}" ],
>                 "files"  :
>                 [
> "${RESPATH}/visionet/decoration/shadow/shadow-window-active-[lr].png"
>                 ]
>               }
>             ],
>             "layout" : "horizontal"
>           },
>
> In Decoration.js the corresponding shadow decorators for qx 1.6 is
> defined as:
>
>     "shadow-window-active" : {
>       decorator : qx.ui.decoration.Grid,
>
>       style : {
>         baseImage : "visionet/decoration/shadow/shadow-window-active.png",
>         insets : [ 10, 10, 10, 10 ]
>       }
>     },
>
> With qx 2.0.1 (and 2.1) I have to write the following to get the same
> result:
>
>     "shadow-window-active" : {
>       decorator : qx.ui.decoration.Grid,
>
>       style : {
>         baseImage : "visionet/decoration/shadow/shadow-window-active.png",
>         insets : [ -10, 30, 30, -10 ]
>       }
>     },
>
> Prior to version 2.0 the job was simple: use the same dimensions in the
> clipping job as in the decorator declaration.
> Now, if I want to have this working I have to perform some calculations
> with regard to the inner logic of widget::_applyShadow.
>
> If you have a lot of borders, shadows (for different widget states) this
> ends up in a lot of manual work which has to be done for the correct
> decorations to be displayed.
>
> Regards.
> Dietrich.
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

Dietrich Streifert
Good morning Martin,

This IS something new in qx 2.0. And I HAD used image decorators for
shadows because I used the aristo theme which did NOT used any css based
shadow decorators. Aristo ALLWAYS used the grid decorator for shadows.

So in the end what I'm complaining about is how the shadow (or
decorator) dimensions are defined. It should not be

     inset: [ -10 30 30 -10 ]

in order to get a shadow of 10px on every side of a widget. It should be

     inset: [ -10 10 10 -10 ]

if the new parameters for top inset and left inset have to be negative
number if the decorator should show up above or before the widget. In my
opinion the  definition in qx 1.6.1 having positive number top and left
insets was perfect.

Instead with the new implementation we have to do

     inset: [ -10 30 30 -10 ]

Why is that? Maybe I'm just not getting the point?

We should NOT need to make ourselves calculations like "how man px do I
have to add to the bottom inset to get a top of 10px IF i have a 10px
top decorator.

Regards
Dietrich


Am 17.07.2012 08:13, schrieb Martin Wittemann:
> Hey,
> I see the problem but thats nothing new. If you would have used the images for decorators instead of shadows, you would have already had that. So I think its better to have the same behavior for shadow and decorator all the time, not only after a resize of the shadow.
> Regards,
> Martin
>


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

MartinWittemann
Administrator
Hey,
> This IS something new in qx 2.0.
Yea, like every other bugfix as well.

> And I HAD used image decorators for shadows because I used the aristo theme which did NOT used any css based shadow decorators. Aristo ALLWAYS used the grid decorator for shadows.
This isn't about CSS decorators or not. The fix was in Widget and not in any decorator at all. And again, I did not change the behavior for nothing. I aligned the shadow behavior with the wider used decorator behavior. Additionally, I fixed a placement bug in case of a resize.

> So in the end what I'm complaining about is how the shadow (or
> decorator) dimensions are defined. It should not be
>
>     inset: [ -10 30 30 -10 ]
>
> in order to get a shadow of 10px on every side of a widget. It should be
>
>     inset: [ -10 10 10 -10 ]
>
> if the new parameters for top inset and left inset have to be negative
> number if the decorator should show up above or before the widget. In my
> opinion the  definition in qx 1.6.1 having positive number top and left
> insets was perfect.
>
> Instead with the new implementation we have to do
>
>     inset: [ -10 30 30 -10 ]
>
> Why is that? Maybe I'm just not getting the point?
>
> We should NOT need to make ourselves calculations like "how man px do I
> have to add to the bottom inset to get a top of 10px IF i have a 10px
> top decorator.

I agree with you that the other way would be nicer. But thats a separate topic and we should open up a report for that. But if the behavior is the same for decorators and shadows (as it should be), we need to change both and with that, need to check every inset we defined for decorator elements. Thats a lot of work and a huge change for all themes. Thats why I aligned the shadow behavior with the decorator behavior and not the other way around.

Regards,
Martin
------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

Dietrich Streifert
Am 17.07.2012 11:55, schrieb Martin Wittemann:
> This isn't about CSS decorators or not. The fix was in Widget and not in any decorator at all. And again, I did not change the behavior for nothing. I aligned the shadow behavior with the wider used decorator behavior. Additionally, I fixed a placement bug in case of a resize.
I know you did the behaviour change intentionally and you surely did a
good job. Maybe my understanding of the difference between decorator and
shadows (which are decorators as well?)  are/were limited.

It would be very helpfull if you could give me/us, as an example, the
correct window shadow definition (from Decoration.js of the qx modern
theme) for a shadow 4px width on top and left and 8px on right and
bottom of a widget. Here are the current definitions:

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

       style : {
         baseImage : "decoration/shadow/shadow.png",
         insets    : [ 4, 8, 8, 4 ]
       }
     },

Thank you for your patience and help and I regret if my writing got an
aggressive touch. It tends to be so if I'm trying to defend my point of
view :-(

Regards
Dietrich


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with shadow decorators and insets in qx 2.0 and master (qx 2.1)

MartinWittemann
Administrator
Hey

> Am 17.07.2012 11:55, schrieb Martin Wittemann:
>> This isn't about CSS decorators or not. The fix was in Widget and not in any decorator at all. And again, I did not change the behavior for nothing. I aligned the shadow behavior with the wider used decorator behavior. Additionally, I fixed a placement bug in case of a resize.
> I know you did the behaviour change intentionally and you surely did a
> good job. Maybe my understanding of the difference between decorator and
> shadows (which are decorators as well?)  are/were limited.
Yes, shadow and decorator both use decorator objects so they are basically the same, at least they should be.

> It would be very helpfull if you could give me/us, as an example, the
> correct window shadow definition (from Decoration.js of the qx modern
> theme) for a shadow 4px width on top and left and 8px on right and
> bottom of a widget. Here are the current definitions:
>
>     "shadow-window" :
>     {
>       decorator : qx.ui.decoration.Grid,
>
>       style : {
>         baseImage : "decoration/shadow/shadow.png",
>         insets    : [ 4, 8, 8, 4 ]
>       }
>     },
I'll check out the bug we have for that soon. I have planed to do it this week. As you have already commented on that bug, you should get a mail as soon as something changes.

> Thank you for your patience and help and I regret if my writing got an
> aggressive touch. It tends to be so if I'm trying to defend my point of
> view :-(
No problem, I know that you just want the framework to be better and thats always a good approach!

Regards,
Martin
------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel