From c53b447e16704a80a80e5d6ae13a6f707f52f698 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Thu, 5 Dec 2013 17:11:27 -0800 Subject: [PATCH] Apply the size title to the entire cell When a change is very small (e.g. 5 lines) the size bar is so few pixels it is nearly impossible to hover over it and see the tooltip. Apply the title to the entire table cell, giving the user a much larger target to hover on. Change-Id: I6ce8ab3a2e55279a9d6345aced42f8c179c608cf --- .../java/com/google/gerrit/client/changes/ChangeTable2.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable2.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable2.java index 215d389a35..96a3ef2e7c 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable2.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable2.java @@ -192,6 +192,7 @@ public class ChangeTable2 extends NavigationTable { private void populateChangeRow(final int row, final ChangeInfo c, boolean highlightUnreviewed) { + CellFormatter fmt = table.getCellFormatter(); if (Gerrit.isSignedIn()) { table.setWidget(row, C_STAR, StarredChanges.createIcon( c.legacy_id(), @@ -227,11 +228,12 @@ public class ChangeTable2 extends NavigationTable { table.setText(row, C_LAST_UPDATE, shortFormat(c.updated())); } table.setWidget(row, C_SIZE, getSizeWidget(c)); + fmt.getElement(row, C_SIZE).setTitle( + Util.M.insertionsAndDeletions(c.insertions(), c.deletions())); boolean displayName = Gerrit.isSignedIn() && Gerrit.getUserAccount() .getGeneralPreferences().isShowUsernameInReviewCategory(); - CellFormatter fmt = table.getCellFormatter(); for (int idx = 0; idx < labelNames.size(); idx++) { String name = labelNames.get(idx); int col = BASE_COLUMNS + idx; @@ -321,7 +323,6 @@ public class ChangeTable2 extends NavigationTable { panel.setStyleName(Gerrit.RESOURCES.css().changeSize()); panel.setWidth(width + "px"); panel.getElement().getStyle().setBackgroundColor(bg); - panel.setTitle(Util.M.insertionsAndDeletions(c.insertions(), c.deletions())); return panel; }