\r
/**\r
* Display a diffstat.\r
- * \r
+ *\r
* @author James Moger\r
*\r
*/\r
WicketUtils.setHtmlTooltip(this, diffStat);\r
\r
final NormalizedDiffStat n = DiffUtils.normalizeDiffStat(5, insertions, deletions);\r
- \r
- final String square = "■";\r
+\r
+ final String segment;\r
+ if (inline) {\r
+ segment = "●";\r
+ } else {\r
+ segment = "■";\r
+ }\r
+\r
add(new Label("total", String.valueOf(total)));\r
- add(new Label("insertions", timesRepeat(n.insertions, square)).setEscapeModelStrings(false).setVisible(n.insertions > 0));\r
- add(new Label("deletions", timesRepeat(n.deletions, square)).setEscapeModelStrings(false).setVisible(n.deletions > 0));\r
- add(new Label("blank", timesRepeat(n.blanks, square)).setEscapeModelStrings(false).setVisible(n.blanks > 0));\r
+ add(new Label("insertions", timesRepeat(n.insertions, segment)).setEscapeModelStrings(false).setVisible(n.insertions > 0));\r
+ add(new Label("deletions", timesRepeat(n.deletions, segment)).setEscapeModelStrings(false).setVisible(n.deletions > 0));\r
+ add(new Label("blank", timesRepeat(n.blanks, segment)).setEscapeModelStrings(false).setVisible(n.blanks > 0));\r
\r
if (inline) {\r
WicketUtils.setCssClass(this, "diffstat-inline");\r