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:
Shawn O. Pearce
2010-05-05 12:45:12 -07:00
parent 6e4dfddfec
commit 8ef3b69f35
6 changed files with 31 additions and 3 deletions

View File

@@ -35,12 +35,12 @@ import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.DOM;
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.FlowPanel;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.Image;
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.HTMLTable.CellFormatter;
import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
@@ -228,7 +228,9 @@ public class ApprovalTable extends Composite {
table.setWidget(row, col++, link(ad.getAccount()));
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( //
FormatUtil.name(accountCache.get(ad.getAccount()))));
remove.setStyleName(Gerrit.RESOURCES.css().removeReviewer());

View File

@@ -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();
}

View File

@@ -24,6 +24,7 @@ import com.google.gwtjsonrpc.client.JsonUtil;
public class Util {
public static final ChangeConstants C = GWT.create(ChangeConstants.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 ChangeListService LIST_SVC;

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

View File

@@ -881,7 +881,6 @@
}
.removeReviewer {
padding: 0px;
font-size: 6pt;
}
td.removeReviewerCell {
padding-left: 4em;