Add user preference to disable showing size bars in change tables

Some users dislike the rainbow colored bars in the change tables that
indicate the change sizes. Add a preference setting to allow users to
switch between colored bars and text representation of the change
size.

Bug: issue 2299
Change-Id: I689c3cebf21252d7f70a5df1d312c179189d10fc
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-12-06 08:43:22 +01:00
parent 6c0cae6972
commit 13e03a7631
9 changed files with 83 additions and 6 deletions

View File

@@ -237,9 +237,16 @@ public class ChangeTable2 extends NavigationTable<ChangeInfo> {
}
int col = C_SIZE;
if (useNewFeatures) {
table.setWidget(row, col, getSizeWidget(c));
fmt.getElement(row, col).setTitle(
Util.M.insertionsAndDeletions(c.insertions(), c.deletions()));
if (Gerrit.isSignedIn()
&& !Gerrit.getUserAccount().getGeneralPreferences()
.isSizeBarInChangeTable()) {
table.setText(row, col,
Util.M.insertionsAndDeletions(c.insertions(), c.deletions()));
} else {
table.setWidget(row, col, getSizeWidget(c));
fmt.getElement(row, col).setTitle(
Util.M.insertionsAndDeletions(c.insertions(), c.deletions()));
}
col++;
}