Nicer-looking button for removeReviewer
Change-Id: Ia45414168fdd8ac5786b85c14241f58b4185ed4e Artwork-by: Daniel Sandler <dsandler@android.com> Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -35,12 +35,12 @@ import com.google.gwt.event.dom.client.ClickEvent;
|
|||||||
import com.google.gwt.event.dom.client.ClickHandler;
|
import com.google.gwt.event.dom.client.ClickHandler;
|
||||||
import com.google.gwt.user.client.DOM;
|
import com.google.gwt.user.client.DOM;
|
||||||
import com.google.gwt.user.client.Element;
|
import com.google.gwt.user.client.Element;
|
||||||
import com.google.gwt.user.client.ui.Button;
|
|
||||||
import com.google.gwt.user.client.ui.Composite;
|
import com.google.gwt.user.client.ui.Composite;
|
||||||
import com.google.gwt.user.client.ui.FlowPanel;
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
import com.google.gwt.user.client.ui.Grid;
|
import com.google.gwt.user.client.ui.Grid;
|
||||||
import com.google.gwt.user.client.ui.Image;
|
import com.google.gwt.user.client.ui.Image;
|
||||||
import com.google.gwt.user.client.ui.Panel;
|
import com.google.gwt.user.client.ui.Panel;
|
||||||
|
import com.google.gwt.user.client.ui.PushButton;
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
|
import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
|
||||||
import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
|
import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
|
||||||
@@ -228,7 +228,9 @@ public class ApprovalTable extends Composite {
|
|||||||
table.setWidget(row, col++, link(ad.getAccount()));
|
table.setWidget(row, col++, link(ad.getAccount()));
|
||||||
|
|
||||||
if (ad.canRemove()) {
|
if (ad.canRemove()) {
|
||||||
Button remove = new Button("X");
|
PushButton remove = new PushButton( //
|
||||||
|
new Image(Util.R.removeReviewerNormal()), //
|
||||||
|
new Image(Util.R.removeReviewerPressed()));
|
||||||
remove.setTitle(Util.M.removeReviewer( //
|
remove.setTitle(Util.M.removeReviewer( //
|
||||||
FormatUtil.name(accountCache.get(ad.getAccount()))));
|
FormatUtil.name(accountCache.get(ad.getAccount()))));
|
||||||
remove.setStyleName(Gerrit.RESOURCES.css().removeReviewer());
|
remove.setStyleName(Gerrit.RESOURCES.css().removeReviewer());
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (C) 2010 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package com.google.gerrit.client.changes;
|
||||||
|
|
||||||
|
import com.google.gwt.resources.client.ClientBundle;
|
||||||
|
import com.google.gwt.resources.client.ImageResource;
|
||||||
|
|
||||||
|
public interface ChangeResources extends ClientBundle {
|
||||||
|
@Source("removeReviewerNormal.png")
|
||||||
|
public ImageResource removeReviewerNormal();
|
||||||
|
|
||||||
|
@Source("removeReviewerPressed.png")
|
||||||
|
public ImageResource removeReviewerPressed();
|
||||||
|
}
|
||||||
@@ -24,6 +24,7 @@ import com.google.gwtjsonrpc.client.JsonUtil;
|
|||||||
public class Util {
|
public class Util {
|
||||||
public static final ChangeConstants C = GWT.create(ChangeConstants.class);
|
public static final ChangeConstants C = GWT.create(ChangeConstants.class);
|
||||||
public static final ChangeMessages M = GWT.create(ChangeMessages.class);
|
public static final ChangeMessages M = GWT.create(ChangeMessages.class);
|
||||||
|
public static final ChangeResources R = GWT.create(ChangeResources.class);
|
||||||
|
|
||||||
public static final ChangeDetailService DETAIL_SVC;
|
public static final ChangeDetailService DETAIL_SVC;
|
||||||
public static final ChangeListService LIST_SVC;
|
public static final ChangeListService LIST_SVC;
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 385 B |
Binary file not shown.
|
After Width: | Height: | Size: 489 B |
@@ -881,7 +881,6 @@
|
|||||||
}
|
}
|
||||||
.removeReviewer {
|
.removeReviewer {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 6pt;
|
|
||||||
}
|
}
|
||||||
td.removeReviewerCell {
|
td.removeReviewerCell {
|
||||||
padding-left: 4em;
|
padding-left: 4em;
|
||||||
|
|||||||
Reference in New Issue
Block a user