Lior Vernia has uploaded a new change for review. Change subject: webadmin: Changed arrow sign from text to image ......................................................................
webadmin: Changed arrow sign from text to image Used to have the Unicode characters for triangles as the label of a button, but would come out garbled in non-English locales. Now using an image instead, with the help of ShapedButton. Also took the chance to give HorizontalSplitTable and ImportNetworksPopupView a tighter look with the help of a designer. Change-Id: I55f73d3edc261e4e16c19a7e345dbb1dc105c9b2 Bug-Url: https://bugzilla.redhat.com/1000285 Signed-off-by: Lior Vernia <[email protected]> --- M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationResources.java M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.java M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.ui.xml A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_click.png A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_disabled.png A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_normal.png A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_over.png A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_click.png A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_disabled.png A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_normal.png A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_over.png M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/provider/ImportNetworksPopupView.ui.xml 13 files changed, 60 insertions(+), 29 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/30/19430/1 diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java index 19d6a7d..37d3a22 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java @@ -334,12 +334,6 @@ @DefaultStringValue("Force Remove") String forceRemove(); - @DefaultStringValue("▼") - String horizontalSplitTableDown(); - - @DefaultStringValue("▲") - String horizontalSplitTableUp(); - // General @DefaultStringValue("Yes") String yes(); diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationResources.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationResources.java index 1aff30f..fe01973 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationResources.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationResources.java @@ -108,6 +108,30 @@ @Source("images/but_close_over.png") ImageResource dialogIconCloseRollover(); + @Source("images/arrows/tri_down_normal.png") + ImageResource arrowDownNormal(); + + @Source("images/arrows/tri_down_click.png") + ImageResource arrowDownClick(); + + @Source("images/arrows/tri_down_over.png") + ImageResource arrowDownOver(); + + @Source("images/arrows/tri_down_disabled.png") + ImageResource arrowDownDisabled(); + + @Source("images/arrows/tri_up_normal.png") + ImageResource arrowUpNormal(); + + @Source("images/arrows/tri_up_click.png") + ImageResource arrowUpClick(); + + @Source("images/arrows/tri_up_over.png") + ImageResource arrowUpOver(); + + @Source("images/arrows/tri_up_disabled.png") + ImageResource arrowUpDisabled(); + // Table image columns @Source("images/comment.png") diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.java index 244bf8c..6cbc469 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.java @@ -4,8 +4,8 @@ import java.util.LinkedList; import java.util.Set; -import org.ovirt.engine.ui.common.CommonApplicationConstants; -import org.ovirt.engine.ui.common.widget.dialog.SimpleDialogButton; +import org.ovirt.engine.ui.common.CommonApplicationResources; +import org.ovirt.engine.ui.common.widget.dialog.ShapedButton; import org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable; import org.ovirt.engine.ui.uicommonweb.UICommand; import org.ovirt.engine.ui.uicommonweb.models.EntityModel; @@ -19,7 +19,6 @@ import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.ButtonBase; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Widget; @@ -33,7 +32,7 @@ WidgetUiBinder uiBinder = GWT.create(WidgetUiBinder.class); } - private static CommonApplicationConstants constants = GWT.create(CommonApplicationConstants.class); + private static CommonApplicationResources resources = GWT.create(CommonApplicationResources.class); private final MultiSelectionModel<EntityModel> topSelectionModel; private final MultiSelectionModel<EntityModel> bottomSelectionModel; @@ -44,11 +43,11 @@ private UICommand onDownButtonPressed; private UICommand onUpButtonPressed; - @UiField - protected SimpleDialogButton downButton; + @UiField(provided = true) + protected ShapedButton downButton; - @UiField - protected SimpleDialogButton upButton; + @UiField(provided = true) + protected ShapedButton upButton; @UiField(provided = true) protected EntityModelCellTable<ListModel> topTable; @@ -72,15 +71,24 @@ this.bottomTable = bottomTable; this.topTitle = new Label(topTitle); this.bottomTitle = new Label(bottomTitle); + + downButton = + new ShapedButton(resources.arrowDownNormal(), + resources.arrowDownClick(), + resources.arrowDownOver(), + resources.arrowDownDisabled()); + upButton = + new ShapedButton(resources.arrowUpNormal(), + resources.arrowUpClick(), + resources.arrowUpOver(), + resources.arrowUpDisabled()); + downButton.setEnabled(false); + upButton.setEnabled(false); + initWidget(WidgetUiBinder.uiBinder.createAndBindUi(this)); topSelectionModel = (MultiSelectionModel<EntityModel>) topTable.getSelectionModel(); bottomSelectionModel = (MultiSelectionModel<EntityModel>) bottomTable.getSelectionModel(); - - downButton.setText(constants.horizontalSplitTableDown()); - upButton.setText(constants.horizontalSplitTableUp()); - downButton.setEnabled(false); - upButton.setEnabled(false); addSelectionHandler(true); addSelectionHandler(false); @@ -90,7 +98,7 @@ private void addSelectionHandler(boolean topTable) { final MultiSelectionModel<EntityModel> selectionModel = getSelectionModel(topTable); - final ButtonBase button = getButton(topTable); + final ShapedButton button = getButton(topTable); selectionModel.addSelectionChangeHandler(new Handler() { @Override @@ -133,7 +141,7 @@ return top ? topSelectionModel : bottomSelectionModel; } - private ButtonBase getButton(boolean down) { + private ShapedButton getButton(boolean down) { return down ? downButton : upButton; } diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.ui.xml b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.ui.xml index 21b675a..63a0ad6 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.ui.xml +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/HorizontalSplitTable.ui.xml @@ -5,14 +5,19 @@ xmlns:d="urn:import:org.ovirt.engine.ui.common.widget.dialog"> <ui:style> + .frame { + height: 520px; + margin: 5px; + } .headers { font-weight: bold; } .tables { - height: 200px; + height: 215px; border-style: solid; border-width: thin; + border-color: gray; } .buttons { @@ -21,8 +26,8 @@ } </ui:style> - <g:DockLayoutPanel ui:field="splitLayoutPanel" height="500px" width="100%"> - <g:north size="230"> + <g:DockLayoutPanel ui:field="splitLayoutPanel" addStyleNames="{style.frame}"> + <g:north size="245"> <g:FlowPanel> <g:Label ui:field="topTitle" addStyleNames="{style.headers}" /> <g:ScrollPanel addStyleNames="{style.tables}"> @@ -34,13 +39,13 @@ <g:HorizontalPanel height="100%" width="100%"> <g:cell horizontalAlignment="ALIGN_CENTER" verticalAlignment="ALIGN_MIDDLE"> <g:HorizontalPanel> - <d:SimpleDialogButton ui:field="downButton" addStyleNames="{style.buttons}" /> - <d:SimpleDialogButton ui:field="upButton" addStyleNames="{style.buttons}" /> + <d:ShapedButton ui:field="downButton" addStyleNames="{style.buttons}" /> + <d:ShapedButton ui:field="upButton" addStyleNames="{style.buttons}" /> </g:HorizontalPanel> </g:cell> </g:HorizontalPanel> </g:center> - <g:south size="230"> + <g:south size="245"> <g:FlowPanel> <g:Label ui:field="bottomTitle" addStyleNames="{style.headers}" /> <g:ScrollPanel addStyleNames="{style.tables}"> diff --git a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_click.png b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_click.png new file mode 100644 index 0000000..fc2e061 --- /dev/null +++ b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_click.png Binary files differ diff --git a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_disabled.png b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_disabled.png new file mode 100644 index 0000000..f10e92b --- /dev/null +++ b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_disabled.png Binary files differ diff --git a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_normal.png b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_normal.png new file mode 100644 index 0000000..4e290e3 --- /dev/null +++ b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_normal.png Binary files differ diff --git a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_over.png b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_over.png new file mode 100644 index 0000000..296445f --- /dev/null +++ b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_down_over.png Binary files differ diff --git a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_click.png b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_click.png new file mode 100644 index 0000000..190e05e --- /dev/null +++ b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_click.png Binary files differ diff --git a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_disabled.png b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_disabled.png new file mode 100644 index 0000000..f024e6d --- /dev/null +++ b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_disabled.png Binary files differ diff --git a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_normal.png b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_normal.png new file mode 100644 index 0000000..fec4294 --- /dev/null +++ b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_normal.png Binary files differ diff --git a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_over.png b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_over.png new file mode 100644 index 0000000..6571b39 --- /dev/null +++ b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/arrows/tri_up_over.png Binary files differ diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/provider/ImportNetworksPopupView.ui.xml b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/provider/ImportNetworksPopupView.ui.xml index 86be241..a73b326 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/provider/ImportNetworksPopupView.ui.xml +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/provider/ImportNetworksPopupView.ui.xml @@ -10,11 +10,11 @@ } .section { - margin-bottom: 30px; + margin-bottom: 5px; } </ui:style> - <d:SimpleDialogPanel ui:field="mainPanel" width="600px" height="650px"> + <d:SimpleDialogPanel ui:field="mainPanel" width="600px" height="625px"> <d:content> <g:VerticalPanel> <g:FlowPanel addStyleNames="{style.section}"> -- To view, visit http://gerrit.ovirt.org/19430 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55f73d3edc261e4e16c19a7e345dbb1dc105c9b2 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Lior Vernia <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
