Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Redesign nav button
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Dec 21, 2011
1 parent d4e942d commit bd385af
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 12 deletions.
Expand Up @@ -22,6 +22,7 @@

import java.util.Map;

import org.zanata.webtrans.client.editor.table.TableResources;
import org.zanata.webtrans.client.presenter.TransUnitNavigationPresenter;
import org.zanata.webtrans.client.resources.EditorConfigConstants;
import org.zanata.webtrans.client.resources.NavigationMessages;
Expand All @@ -33,6 +34,7 @@
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;

Expand All @@ -45,8 +47,8 @@ interface TransUnitNavigationViewUiBinder extends UiBinder<Widget, TransUnitNavi
{
}

@UiField
Image nextEntry, prevEntry, prevState, nextState, firstEntry, lastEntry;
@UiField(provided = true)
PushButton nextEntry, prevEntry, prevState, nextState, firstEntry, lastEntry;

private final NavigationMessages messages;

Expand All @@ -58,6 +60,14 @@ public TransUnitNavigationView(final NavigationMessages messages, final Resource
{
this.resources = resources;
this.messages = messages;

nextEntry = new PushButton(new Image(resources.nextEntry()));
prevEntry = new PushButton(new Image(resources.prevEntry()));
prevState = new PushButton(new Image(resources.prevState()));
nextState = new PushButton(new Image(resources.nextState()));
firstEntry = new PushButton(new Image(resources.firstEntry()));
lastEntry = new PushButton(new Image(resources.lastEntry()));

initWidget(uiBinder.createAndBindUi(this));

prevEntry.setTitle(messages.actionToolTip(messages.prevEntry(), messages.prevEntryShortcut()));
Expand Down
Expand Up @@ -10,13 +10,27 @@
cursor: pointer;
margin-left:40px;
}

.nav-button {
width:35px;
height:12px;
border-radius:5px;
}

.rootContainer{
}

.rootContainer td {
padding-right:5px;

}
</ui:style>
<g:HTMLPanel>
<g:Image resource="{resources.firstEntry}" ui:field="firstEntry" styleName="{style.imageAnchor}"/>
<g:Image resource="{resources.prevState}" ui:field="prevState" styleName="{style.imageAnchor}"/>
<g:Image resource="{resources.prevEntry}" ui:field="prevEntry" styleName="{style.imageAnchor}"/>
<g:Image resource="{resources.nextEntry}" ui:field="nextEntry" styleName="{style.imageAnchor}"/>
<g:Image resource="{resources.nextState}" ui:field="nextState" styleName="{style.imageAnchor}"/>
<g:Image resource="{resources.lastEntry}" ui:field="lastEntry" styleName="{style.imageAnchor}"/>
</g:HTMLPanel>
<g:HorizontalPanel styleName="{style.rootContainer}">
<g:PushButton ui:field="firstEntry" addStyleNames="{style.nav-button}"/>
<g:PushButton ui:field="prevState" addStyleNames="{style.nav-button}"/>
<g:PushButton ui:field="prevEntry" addStyleNames="{style.nav-button}"/>
<g:PushButton ui:field="nextEntry" addStyleNames="{style.nav-button}"/>
<g:PushButton ui:field="nextState" addStyleNames="{style.nav-button}"/>
<g:PushButton ui:field="lastEntry" addStyleNames="{style.nav-button}"/>
</g:HorizontalPanel>
</ui:UiBinder>
Expand Up @@ -36,7 +36,7 @@
<g:layer left="7px" width="40%" top="2px" height="23px">
<g:LayoutPanel ui:field="filterPanelContainer" />
</g:layer>
<g:layer width="50%" right="30px" top="2px" height="23px">
<g:layer width="50%" right="30px" top="1px" height="23px">
<g:FlowPanel ui:field="transUnitNavigationContainer" styleName="{style.centerText}"/>
</g:layer>
<g:layer top="25px" bottom="2em">
Expand Down
Expand Up @@ -34,7 +34,7 @@
<g:LayoutPanel ui:field="editorContainer" />
</g:layer>

<g:layer height="23px" width="80px" right="5px" top="2px">
<g:layer height="23px" width="80px" right="5px" top="3px">
<g:FlowPanel>
<g:ToggleButton ui:field="toogleOptionsButton"/>
</g:FlowPanel>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bd385af

Please sign in to comment.