Alexander Wels has uploaded a new change for review. Change subject: webadmin: title overlaps header icon ......................................................................
webadmin: title overlaps header icon - For dialogs with header icons the title would overlap the icon. This patch fixes the overlap. Change-Id: I398b5daf8c02734a7b0e9e9777494100ee808d12 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1057101 Signed-off-by: Alexander Wels <[email protected]> --- M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java 1 file changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/71/23771/1 diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java index 9640a9f..5077b3c 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java @@ -3,6 +3,9 @@ import org.ovirt.engine.ui.uicommonweb.UICommand; import com.google.gwt.core.client.GWT; +import com.google.gwt.core.client.Scheduler; +import com.google.gwt.core.client.Scheduler.ScheduledCommand; +import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.HasClickHandlers; @@ -72,6 +75,7 @@ @UiChild(tagname = "logo", limit = 1) public void setLogo(Widget widget) { logoPanel.setWidget(widget); + updateTitlePadding(); } @Override @@ -81,6 +85,19 @@ widget.addStyleName(style.contentWidget()); } + void updateTitlePadding() { + Scheduler.get().scheduleDeferred(new ScheduledCommand() { + @Override + public void execute() { + int logoWidth = logoPanel.getOffsetWidth(); + if (logoWidth > 0) { + logoWidth += 10; //Add 10 pixels to account for margins/left style of the image div. + headerTitlePanel.getParent().getElement().getStyle().setMarginLeft(logoWidth, Unit.PX); + } + } + }); + } + @Override public Widget getContent() { return contentPanel.getWidget(); -- To view, visit http://gerrit.ovirt.org/23771 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I398b5daf8c02734a7b0e9e9777494100ee808d12 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
