Gilad Chaplik has uploaded a new change for review.

Change subject: webadmin: fix QoS dialog indentation
......................................................................

webadmin: fix QoS dialog indentation

Labels will be positions above the fields, instead
of next to it (to avoid other locale issues).

Also fixed unnecessary dialog scroll bars, and adjusted
dialog width.

Change-Id: Ifbcfa6849284d2e087c6884aa79cd77d9f4c3096
Bug-Url: https://bugzilla.redhat.com/1001546
Signed-off-by: Gilad Chaplik <gchap...@redhat.com>
---
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.ui.xml
2 files changed, 74 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/42/19642/1

diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.java
index 6047b30..c48bf7b 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.java
@@ -1,13 +1,6 @@
 package org.ovirt.engine.ui.webadmin.section.main.view.popup.networkQoS;
 
 
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.editor.client.SimpleBeanEditorDriver;
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.resources.client.CssResource;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.inject.Inject;
 import org.ovirt.engine.core.common.businessentities.StoragePool;
 import org.ovirt.engine.ui.common.idhandler.ElementIdHandler;
 import org.ovirt.engine.ui.common.idhandler.WithElementId;
@@ -16,12 +9,21 @@
 import org.ovirt.engine.ui.common.widget.dialog.SimpleDialogPanel;
 import org.ovirt.engine.ui.common.widget.editor.EntityModelCheckBoxEditor;
 import org.ovirt.engine.ui.common.widget.editor.EntityModelTextBoxEditor;
+import org.ovirt.engine.ui.common.widget.editor.EntityModelTextBoxOnlyEditor;
 import org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor;
 import org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer;
 import org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkQoSModel;
 import org.ovirt.engine.ui.webadmin.ApplicationConstants;
 import org.ovirt.engine.ui.webadmin.ApplicationResources;
 import 
org.ovirt.engine.ui.webadmin.section.main.presenter.popup.NetworkQoSPopupPresenterWidget;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.editor.client.SimpleBeanEditorDriver;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.resources.client.CssResource;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.inject.Inject;
 
 
 public class NetworkQoSPopupView extends 
AbstractModelBoundPopupView<NetworkQoSModel>
@@ -53,32 +55,32 @@
     @UiField
     @Path(value = "inboundAverage.entity")
     @WithElementId
-    EntityModelTextBoxEditor inboundAverageEditor;
+    EntityModelTextBoxOnlyEditor inboundAverageEditor;
 
     @UiField
     @Path(value = "inboundPeak.entity")
     @WithElementId
-    EntityModelTextBoxEditor inboundPeakEditor;
+    EntityModelTextBoxOnlyEditor inboundPeakEditor;
 
     @UiField
     @Path(value = "inboundBurst.entity")
     @WithElementId
-    EntityModelTextBoxEditor inboundBurstEditor;
+    EntityModelTextBoxOnlyEditor inboundBurstEditor;
 
     @UiField
     @Path(value = "outboundAverage.entity")
     @WithElementId
-    EntityModelTextBoxEditor outboundAverageEditor;
+    EntityModelTextBoxOnlyEditor outboundAverageEditor;
 
     @UiField
     @Path(value = "outboundPeak.entity")
     @WithElementId
-    EntityModelTextBoxEditor outboundPeakEditor;
+    EntityModelTextBoxOnlyEditor outboundPeakEditor;
 
     @UiField
     @Path(value = "outboundBurst.entity")
     @WithElementId
-    EntityModelTextBoxEditor outboundBurstEditor;
+    EntityModelTextBoxOnlyEditor outboundBurstEditor;
 
 
 
@@ -108,12 +110,16 @@
 
         localize(constants);
         driver.initialize(this);
-        
inboundAverageEditor.asValueBox().getParent().setStyleName(style.valuePanelWidth());
-        
inboundPeakEditor.asValueBox().getParent().setStyleName(style.valuePanelWidth());
-        
inboundBurstEditor.asValueBox().getParent().setStyleName(style.valuePanelWidth());
-        
outboundAverageEditor.asValueBox().getParent().setStyleName(style.valuePanelWidth());
-        
outboundPeakEditor.asValueBox().getParent().setStyleName(style.valuePanelWidth());
-        
outboundBurstEditor.asValueBox().getParent().setStyleName(style.valuePanelWidth());
+        setStyle();
+    }
+
+    private void setStyle() {
+        inboundAverageEditor.setContentWidgetStyleName(style.valueWidth());
+        inboundPeakEditor.setContentWidgetStyleName(style.valueWidth());
+        inboundBurstEditor.setContentWidgetStyleName(style.valueWidth());
+        outboundAverageEditor.setContentWidgetStyleName(style.valueWidth());
+        outboundPeakEditor.setContentWidgetStyleName(style.valueWidth());
+        outboundBurstEditor.setContentWidgetStyleName(style.valueWidth());
     }
 
     private void initListBoxEditors() {
@@ -128,12 +134,6 @@
     void localize(ApplicationConstants constants) {
         nameEditor.setLabel(constants.networkQoSName());
         dataCenterEditor.setLabel(constants.dataCenterNetworkQoSPopup());
-        inboundAverageEditor.setLabel(constants.averageNetworkQoSPopup());
-        inboundPeakEditor.setLabel(constants.peakNetworkQoSPopup());
-        inboundBurstEditor.setLabel(constants.burstNetworkQoSPopup());
-        outboundAverageEditor.setLabel(constants.averageNetworkQoSPopup());
-        outboundPeakEditor.setLabel(constants.peakNetworkQoSPopup());
-        outboundBurstEditor.setLabel(constants.burstNetworkQoSPopup());
         inboundEnabled.setLabel(constants.inboundLabelQoSPopup());
         outboundEnabled.setLabel(constants.outboundLabelQoSPopup());
         inboundAverageEditor.setTitle(constants.averageNetworkQoSPopup() + 
constants.inMegabitsNetworkQoSPopup());
@@ -158,6 +158,6 @@
 
 
     interface WidgetStyle extends CssResource {
-        String valuePanelWidth();
+        String valueWidth();
     }
 }
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.ui.xml
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.ui.xml
index ed9fc91..6fbb769 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.ui.xml
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/networkQoS/NetworkQoSPopupView.ui.xml
@@ -9,33 +9,32 @@
        <ui:style 
type="org.ovirt.engine.ui.webadmin.section.main.view.popup.networkQoS.NetworkQoSPopupView.WidgetStyle">
                .topDecorator {
                        background-color: #D3D3D3;
-                       margin-bottom: 8px;
-                       margin-top: 4px;
-                       margin-right: 3px;
-                       padding-top: 6px;
-                       padding-bottom: 6px;
+                       margin: 5px;
                }
                .labelStyle {
                        font-weight: bold;
+                       width: 90%;
                        padding-left: 5px;
-                       margin-top: 30px;
                }
                .mbpsLabel {
                        text-align: right;
                        font-size: smaller;
                        color: gray;
                }
-               .valuePanelWidth {
-                       width: 65px;
-                       float: right;
+               .valueWidth {
+                       width: 60px;
+                       padding-left: 5px;
                }
-               .marginLeft {
-                       margin-left: 40px;
+               .valuePanelStyle {
+                       padding-left: 30px;
+                       width: 120px;
                }
-
+               .textBoxLabelStyle {
+                       padding-left: 5px;
+               }
        </ui:style>
 
-       <d:SimpleDialogPanel width="500px" height="400px">
+       <d:SimpleDialogPanel width="400px" height="400px">
                <d:content>
                        <g:FlowPanel>
                                <g:FlowPanel 
addStyleNames="{style.topDecorator}">
@@ -44,32 +43,50 @@
                                </g:FlowPanel>
                                <e:EntityModelCheckBoxEditor 
addStyleNames="{style.labelStyle}" ui:field="inboundEnabled"/>
                                <g:HorizontalPanel>
-                                       <g:VerticalPanel>
-                                               <e:EntityModelTextBoxEditor 
addStyleNames="{style.marginLeft}" ui:field="inboundAverageEditor" />
-                                               <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbpsLabelQoSPopup}"/>
+                                       <g:VerticalPanel 
addStyleNames="{style.valuePanelStyle}">
+                                               <g:Label 
addStyleNames="{style.textBoxLabelStyle}" 
text="{constants.averageNetworkQoSPopup}"/>
+                                               <g:VerticalPanel>
+                                                       
<e:EntityModelTextBoxOnlyEditor ui:field="inboundAverageEditor" />
+                                                       <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbpsLabelQoSPopup}"/>
+                                               </g:VerticalPanel>
                                        </g:VerticalPanel>
-                                       <g:VerticalPanel>
-                                               <e:EntityModelTextBoxEditor 
addStyleNames="{style.marginLeft}" ui:field="inboundPeakEditor" />
-                                               <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbpsLabelQoSPopup}"/>
+                                       <g:VerticalPanel 
addStyleNames="{style.valuePanelStyle}">
+                                               <g:Label 
addStyleNames="{style.textBoxLabelStyle}" 
text="{constants.peakNetworkQoSPopup}"/>
+                                               <g:VerticalPanel>
+                                                       
<e:EntityModelTextBoxOnlyEditor ui:field="inboundPeakEditor" />
+                                                       <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbpsLabelQoSPopup}"/>
+                                               </g:VerticalPanel>
                                        </g:VerticalPanel>
-                                       <g:VerticalPanel>
-                                               <e:EntityModelTextBoxEditor 
addStyleNames="{style.marginLeft}" ui:field="inboundBurstEditor" />
-                                               <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbLabelQoSPopup}"/>
+                                       <g:VerticalPanel 
addStyleNames="{style.valuePanelStyle}">
+                                               <g:Label 
addStyleNames="{style.textBoxLabelStyle}" 
text="{constants.burstNetworkQoSPopup}"/>
+                                               <g:VerticalPanel>
+                                                       
<e:EntityModelTextBoxOnlyEditor ui:field="inboundBurstEditor" />
+                                                       <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbLabelQoSPopup}"/>
+                                               </g:VerticalPanel>
                                        </g:VerticalPanel>
                                </g:HorizontalPanel>
                                <e:EntityModelCheckBoxEditor 
addStyleNames="{style.labelStyle}" ui:field="outboundEnabled"/>
                                <g:HorizontalPanel>
-                                       <g:VerticalPanel>
-                                               <e:EntityModelTextBoxEditor 
addStyleNames="{style.marginLeft}" ui:field="outboundAverageEditor" />
-                                               <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbpsLabelQoSPopup}"/>
+                                       <g:VerticalPanel 
addStyleNames="{style.valuePanelStyle}">
+                                               <g:Label 
addStyleNames="{style.textBoxLabelStyle}" 
text="{constants.averageNetworkQoSPopup}"/>
+                                               <g:VerticalPanel>
+                                                       
<e:EntityModelTextBoxOnlyEditor ui:field="outboundAverageEditor" />
+                                                       <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbpsLabelQoSPopup}"/>
+                                               </g:VerticalPanel>
                                        </g:VerticalPanel>
-                                       <g:VerticalPanel>
-                                               <e:EntityModelTextBoxEditor 
addStyleNames="{style.marginLeft}" ui:field="outboundPeakEditor" />
-                                               <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbpsLabelQoSPopup}"/>
+                                       <g:VerticalPanel 
addStyleNames="{style.valuePanelStyle}">
+                                               <g:Label 
addStyleNames="{style.textBoxLabelStyle}" 
text="{constants.peakNetworkQoSPopup}"/>
+                                               <g:VerticalPanel>
+                                                       
<e:EntityModelTextBoxOnlyEditor ui:field="outboundPeakEditor" />
+                                                       <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbpsLabelQoSPopup}"/>
+                                               </g:VerticalPanel>
                                        </g:VerticalPanel>
-                                       <g:VerticalPanel>
-                                               <e:EntityModelTextBoxEditor 
addStyleNames="{style.marginLeft}" ui:field="outboundBurstEditor" />
-                                               <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbLabelQoSPopup}"/>
+                                       <g:VerticalPanel 
addStyleNames="{style.valuePanelStyle}">
+                                               <g:Label 
addStyleNames="{style.textBoxLabelStyle}" 
text="{constants.burstNetworkQoSPopup}"/>
+                                               <g:VerticalPanel>
+                                                       
<e:EntityModelTextBoxOnlyEditor ui:field="outboundBurstEditor" />
+                                                       <g:Label 
addStyleNames="{style.mbpsLabel}" text="{constants.mbLabelQoSPopup}"/>
+                                               </g:VerticalPanel>
                                        </g:VerticalPanel>
                                </g:HorizontalPanel>
                        </g:FlowPanel>


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

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

Reply via email to