summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-09-30 07:59:42 -0400
committerJames Moger <james.moger@gitblit.com>2013-09-30 10:10:36 -0400
commit58be4a33a1ca70baae779d80eff5d79ab7c523a3 (patch)
tree64171a9cd3fd069280b6f87bf0df73305c9fec5e /src/main
parent319342c09152c61af13930e79777e1396f9c397f (diff)
downloadgitblit-58be4a33a1ca70baae779d80eff5d79ab7c523a3.tar.gz
gitblit-58be4a33a1ca70baae779d80eff5d79ab7c523a3.zip
Change diffstat character to improve look and layout
Change-Id: I7a70b04e9b8e49a78d98e0842aeda3f6d8e3ce28
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/gitblit/wicket/panels/DiffStatPanel.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/DiffStatPanel.java b/src/main/java/com/gitblit/wicket/panels/DiffStatPanel.java
index e1f0af92..30a89027 100644
--- a/src/main/java/com/gitblit/wicket/panels/DiffStatPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/DiffStatPanel.java
@@ -26,7 +26,7 @@ import com.gitblit.wicket.WicketUtils;
/**
* Display a diffstat.
- *
+ *
* @author James Moger
*
*/
@@ -62,12 +62,18 @@ public class DiffStatPanel extends Panel {
WicketUtils.setHtmlTooltip(this, diffStat);
final NormalizedDiffStat n = DiffUtils.normalizeDiffStat(5, insertions, deletions);
-
- final String square = "&#9632;";
+
+ final String segment;
+ if (inline) {
+ segment = "&#9679;";
+ } else {
+ segment = "&#9632;";
+ }
+
add(new Label("total", String.valueOf(total)));
- add(new Label("insertions", timesRepeat(n.insertions, square)).setEscapeModelStrings(false).setVisible(n.insertions > 0));
- add(new Label("deletions", timesRepeat(n.deletions, square)).setEscapeModelStrings(false).setVisible(n.deletions > 0));
- add(new Label("blank", timesRepeat(n.blanks, square)).setEscapeModelStrings(false).setVisible(n.blanks > 0));
+ add(new Label("insertions", timesRepeat(n.insertions, segment)).setEscapeModelStrings(false).setVisible(n.insertions > 0));
+ add(new Label("deletions", timesRepeat(n.deletions, segment)).setEscapeModelStrings(false).setVisible(n.deletions > 0));
+ add(new Label("blank", timesRepeat(n.blanks, segment)).setEscapeModelStrings(false).setVisible(n.blanks > 0));
if (inline) {
WicketUtils.setCssClass(this, "diffstat-inline");