Vojtech Szocs has posted comments on this change. Change subject: webadmin: moving the Login popup to center on Browser resize ......................................................................
Patch Set 1: We can use CSS to center any popup on browser resize, including both SimplePopupPanel [login popup widget] and SimpleDialogPanel [generic application popup widget]. Currently, both PopupPanels use <div> element with [position:absolute, left:x, top:y]. This means we have to detect window resize via JavaScript and re-position the <div> element [left & top]. Assuming PopupPanel has explicit width and height set, we could just use <div> element with [position:absolute, left:50%, top:50%, margin-left:-width/2, margin-top:-height/2]. I've tested above mentioned approach and here are my findings: * dialog resize (ResizableDialogBox.enableResizeSupport) behavior fits with with new CSS rules, e.g. when I increase dialog width and resize window horizontally, the right gap (between dialog edge and window edge) is still proportional to window width * the only issue is with dialog dragging, just because GWT DialogBox uses [position:absolute, left:x, top:y] approach which messes up with new CSS rules; however this can be fixed So I suggest to give this CSS approach a try -- if it fails (e.g. we still have problems with dialog dragging), we can use window resize handler. What do you think guys? -- To view, visit http://gerrit.ovirt.org/12468 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibe16a88a094ad5fa4a5cf81892183f44c1ff3600 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Kanagaraj M <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Einav Cohen <[email protected]> Gerrit-Reviewer: Gilad Chaplik <[email protected]> Gerrit-Reviewer: Shireesh Anjal <[email protected]> Gerrit-Reviewer: Vojtech Szocs <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
