Re: PopupPanel.center() not centering content?

2013-10-29 Thread Saad S
I too am experiencing this problem in my code, where I have a large hierarchy of panels contained within the PopupPanel or DecoratedPopupPanel. A simple GWT Designer app with a label in the PopupPanel or DecoratedPopupPanel works as expected. -- You received this message because you are

Re: PopupPanel.center() not centering content?

2013-10-29 Thread Ed Bras
I currently center it by adding the content, that needs to be centered to a container div that has a style that will take care of the styling (something like margin: auto; position:absolute; left:0; top:0; bottom:0; right:0). Note: i don't use fixed as position such that I can move the whole

Re: PopupPanel.center() not centering content?

2013-04-05 Thread Ed Bras
I tried to isolate it to some GWT-only code, but didn't manage to get it isolated with the centering problem :( (at least not within some acceptable time). I use many own widgets/panels with own resource bundles and style imports. I removed all the animations, but even when using a simple

Re: PopupPanel.center() not centering content?

2013-03-30 Thread Ed Bras
Any idea? Should I report this as a bug? And what are the possible workarounds? On Mon, Mar 25, 2013 at 2:59 PM, Ed Bras post2edb...@gmail.com wrote: Hi Jens, Thanks for the code example. I tired it and your code example works, see attachment. However, instead of setting the popup content

Re: PopupPanel.center() not centering content?

2013-03-30 Thread Jens
Can you share code for a popup content that reproduces the problem? -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: PopupPanel.center() not centering content?

2013-03-30 Thread Ed Bras
I will do, I just have to isolate the code, such that it's useful. I will post it here in a few days. On Sat, Mar 30, 2013 at 2:34 PM, Jens jens.nehlme...@gmail.com wrote: Can you share code for a popup content that reproduces the problem? -- J. -- You received this message because you

Re: PopupPanel.center() not centering content?

2013-03-22 Thread Ed Bras
Can somebody please test the above centering of the popup ? Let's confirm that it's not only me such that I can report it as a bug. Any ideas for workarounds? (some action to trigger the correct dimensions) - Ed On Wed, Mar 20, 2013 at 12:42 PM, Jens jens.nehlme...@gmail.com wrote: I just

Re: PopupPanel.center() not centering content?

2013-03-22 Thread Hilco Wijbenga
On 22 March 2013 12:41, Ed Bras post2edb...@gmail.com wrote: Can somebody please test the above centering of the popup ? Let's confirm that it's not only me such that I can report it as a bug. I haven't tried your exact use case but I can confirm that centering does not always work. Sometimes

Re: PopupPanel.center() not centering content?

2013-03-22 Thread Jens
Can somebody please test the above centering of the popup ? Let's confirm that it's not only me such that I can report it as a bug. Any ideas for workarounds? (some action to trigger the correct dimensions) The code below works for me in FF 19.0.2, Chrome 25.0.x (using GWT 2.5.1 and

Re: PopupPanel.center() not centering content?

2013-03-20 Thread Thomas Broyer
This is strange, I'd swear it used to work… It must then be a lower-level change, as I don't see anything suspicious in the latest changes to PopupPanel or any ancestor class. On Tuesday, March 19, 2013 9:09:33 PM UTC+1, Ed wrote: An example: Attacheded: the FF (19,02), Chrome (24), IE (10)

Re: PopupPanel.center() not centering content?

2013-03-20 Thread Jens
This is strange, I'd swear it used to work… It must then be a lower-level change, as I don't see anything suspicious in the latest changes to PopupPanel or any ancestor class. We use PopupPanel.center() for showing wizards. Also we calculate optimal wizard sizes before first showing the

Re: PopupPanel.center() not centering content?

2013-03-20 Thread Thomas Broyer
I suppose Ed does not set the popup size explicitly and relies on the intrinsic size of the content. And strangely getOffsetWidth() returns 0 so the top-left corner is positioned at the center of the viewport (and then only the popup gets its actual intrinsic dimensions, but it's too late; but

Re: PopupPanel.center() not centering content?

2013-03-20 Thread Ed Bras
This is strange, I'd swear it used to work… Could you please try this and see if you have the same result as me? I suppose Ed does not set the popup size explicitly and relies on the intrinsic size of the content. Yes, exactly, I don't calculate anything (just like the code shows). I don't even

Re: PopupPanel.center() not centering content?

2013-03-20 Thread Jens
I just changed my code a bit and removed any explicit sizes on the PopupPanel itself. Now when adding a Label without any size or something else with explicit sizes everything still works as expected without using any deferred command. @Ed: We use LayoutPanel inside PopupPanel so either the

PopupPanel.center() not centering content?

2013-03-19 Thread Ed
What is the correct way to center content as a popup in the middle of the page? I am asking this because if I use GWT PopupPanel.center() method, it will not correctly center it's content, however the top left corner will be in the center of the page ;).. If however, I overrridde the

Re: PopupPanel.center() not centering content?

2013-03-19 Thread Thomas Broyer
Getting the size of the added content should be enough to trigger a reflow so the dimensions are OK and so is the positionning. It might be that browsers have changed their strategies wrt hidden content (visibility:hidden, not display:none, which is expected to not have dimensions) At least