Alexander Wels has posted comments on this change.

Change subject: webadmin: title overlaps header icon
......................................................................


Patch Set 1: Verified+1

(2 comments)

http://gerrit.ovirt.org/#/c/23771/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java:

Line 85:         widget.addStyleName(style.contentWidget());
Line 86:     }
Line 87: 
Line 88:     void updateTitlePadding() {
Line 89:         Scheduler.get().scheduleDeferred(new ScheduledCommand() {
> why the deferred?
Because at this point in time, the element hasn't been attached to the DOM yet, 
and therefore doesn't have a size yet. I have to defer the execution of this 
code so that the element will have been attached to the DOM and thus has a size.
Line 90:             @Override
Line 91:             public void execute() {
Line 92:                 int logoWidth = logoPanel.getOffsetWidth();
Line 93:                 if (logoWidth > 0) {


Line 90:             @Override
Line 91:             public void execute() {
Line 92:                 int logoWidth = logoPanel.getOffsetWidth();
Line 93:                 if (logoWidth > 0) {
Line 94:                     logoWidth += 10; //Add 10 pixels to account for 
margins/left style of the image div.
> is it possible in GWT to read the margin and padding from the image's style
It is if I have intimate knowledge of the structure of the elements making up 
the header. Which technically I do, but I don't really want to make this code 
aware of it. So it was easier to just pick a decent number and go with that.
Line 95:                     
headerTitlePanel.getParent().getElement().getStyle().setMarginLeft(logoWidth, 
Unit.PX);
Line 96:                 }
Line 97:             }
Line 98:         });


-- 
To view, visit http://gerrit.ovirt.org/23771
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I398b5daf8c02734a7b0e9e9777494100ee808d12
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to