Alexander Wels has uploaded a new change for review.

Change subject: webadmin: help icon overflow
......................................................................

webadmin: help icon overflow

- Fixed issue where if a popup header was too long it would cause
  the help icon to overflow to the next line and look out of place.
  Re-arranged the header layout a little bit so the title text is in
  its own div that is moved on top of the title background to allow
  for flowing onto any background.

Signed-off-by: Alexander Wels <aw...@redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1001554
Change-Id: I10abcbd977df4367584cc22529b47334c4c00d99
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.ui.xml
M packaging/branding/ovirt.brand/common.css
3 files changed, 32 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/50/19850/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 927bb83..6fd538e 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
@@ -28,18 +28,14 @@
 
         String contentWidget();
 
-        String headerContainerWithBlankLogo();
-
+        String headerTitleFloat();
     }
 
     @UiField
     SimplePanel logoPanel;
 
     @UiField
-    FlowPanel headerContainerPanel;
-
-    @UiField
-    SimplePanel headerTitlePanel;
+    FlowPanel headerTitlePanel;
 
     @UiField
     SimplePanel contentPanel;
@@ -61,8 +57,6 @@
 
     private UICommand helpCommand;
 
-    private boolean useBlankLogo = true;
-
     public SimpleDialogPanel() {
         setWidget(WidgetUiBinder.uiBinder.createAndBindUi(this));
         getElement().getStyle().setZIndex(1);
@@ -72,23 +66,13 @@
     @Override
     @UiChild(tagname = "header", limit = 1)
     public void setHeader(Widget widget) {
-        headerTitlePanel.setWidget(widget);
-        updateHeaderContainerStyle();
+        widget.addStyleName(style.headerTitleFloat());
+        headerTitlePanel.insert(widget, 0); //Put the label at the front.
     }
 
     @UiChild(tagname = "logo", limit = 1)
     public void setLogo(Widget widget) {
         logoPanel.setWidget(widget);
-        useBlankLogo = false;
-        updateHeaderContainerStyle();
-    }
-
-    void updateHeaderContainerStyle() {
-        if (useBlankLogo) {
-            
headerContainerPanel.addStyleName(style.headerContainerWithBlankLogo());
-        } else {
-            
headerContainerPanel.removeStyleName(style.headerContainerWithBlankLogo());
-        }
     }
 
     @Override
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.ui.xml
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.ui.xml
index 0bee6ff..259b511 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.ui.xml
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.ui.xml
@@ -26,13 +26,8 @@
                .obrand_headerCenterPanel {
                }
 
-               .headerTitle {
-                       text-align: left;
-                       font-size: 14px;
-                       font-weight: bold;
-                       color: white;
-                       margin-left: 6px;
-                       float: left;
+        @external obrand_headerTitle;
+               .obrand_headerTitle {
                }
 
                .content {
@@ -66,10 +61,9 @@
                        position: absolute;
                }
 
-               .headerContainerWithBlankLogo {
-                       position: relative;
-                       left: -27px;
-               }
+        .headerTitleFloat {
+            float: left;
+        }
 
                .helpIconButton {
                        background: transparent;
@@ -81,7 +75,7 @@
                        z-index: 1;
                        float: left;
                        position: relative;
-                       top: -3px;
+                       top: -5px;
                }
 
                .closeIconButton {
@@ -111,16 +105,7 @@
                        <g:SimplePanel ui:field="logoPanel" 
addStyleNames="{style.headerLeftPanel}">
                                <g:Image styleName='obrand_dialogLogoImage' 
url="clear.cache.gif" />
                        </g:SimplePanel>
-                       <g:FlowPanel 
addStyleNames="{style.obrand_headerCenterPanel}">
-                               <g:FlowPanel ui:field="headerContainerPanel">
-                                       <g:SimplePanel 
ui:field="headerTitlePanel" addStyleNames="{style.headerTitle}" />
-                                       <g:PushButton ui:field="helpIconButton" 
addStyleNames="{style.helpIconButton}" visible="false">
-                                               <g:upFace 
image='{resources.dialogIconHelp}' />
-                                               <g:downFace 
image='{resources.dialogIconHelpDown}' />
-                                               <g:upHoveringFace 
image='{resources.dialogIconHelpRollover}' />
-                                       </g:PushButton>
-                               </g:FlowPanel>
-                       </g:FlowPanel>
+                       <g:SimplePanel 
addStyleNames="{style.obrand_headerCenterPanel}" />
                        <g:SimplePanel addStyleNames="{style.headerRightPanel}">
                                <g:FlowPanel>
                                        <g:Image 
styleName='obrand_dialogHeaderImage' url="clear.cache.gif" />
@@ -131,6 +116,15 @@
                                        </g:PushButton>
                                </g:FlowPanel>
                        </g:SimplePanel>
+                       <g:FlowPanel addStyleNames="{style.obrand_headerTitle}">
+                <g:FlowPanel ui:field="headerTitlePanel">
+                    <g:PushButton ui:field="helpIconButton" 
addStyleNames="{style.helpIconButton}" visible="false">
+                        <g:upFace image='{resources.dialogIconHelp}' />
+                        <g:downFace image='{resources.dialogIconHelpDown}' />
+                        <g:upHoveringFace 
image='{resources.dialogIconHelpRollover}' />
+                    </g:PushButton>
+                </g:FlowPanel>
+                       </g:FlowPanel>
                </g:FlowPanel>
 
                <g:SimplePanel ui:field="contentPanel" 
addStyleNames="{style.content}" />
diff --git a/packaging/branding/ovirt.brand/common.css 
b/packaging/branding/ovirt.brand/common.css
index f9d6f0a..b697d3a 100644
--- a/packaging/branding/ovirt.brand/common.css
+++ b/packaging/branding/ovirt.brand/common.css
@@ -59,6 +59,18 @@
     right: 123px;
 }
 
+.obrand_headerTitle {
+    text-align: left;
+    font-size: 14px;
+    font-weight: bold;
+    color: white;
+    margin-left: 14px;
+    float: left;
+    position: relative;
+    margin-top: 5px;
+}
+
+
 /* ErrorPopupView.ui.xml:
 This class allows you to change the error icon on the error popup window. */
 .obrand_dialogLogoErrorImage {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10abcbd977df4367584cc22529b47334c4c00d99
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Alexander Wels <aw...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to