summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorRüdiger Herrmann <ruediger.herrmann@gmx.de>2014-03-13 11:30:20 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2014-03-13 23:39:36 +0100
commit24921e12d0f02412e21f132a003262efc02290c2 (patch)
tree2717d9292b5dfdf9247ec0b145e083f926ffea18 /org.eclipse.jgit
parent4c3e7931ed1eb2c686e6e90a57e9122cf603d68c (diff)
downloadjgit-24921e12d0f02412e21f132a003262efc02290c2.tar.gz
jgit-24921e12d0f02412e21f132a003262efc02290c2.zip
Fix text alignment in history plot renderer
When more than one lane is drawn, some commits are vertically misaligned (off by two pixels). This change fixes the alignment. Bug: 426047 Change-Id: Icbe7ce9f5a6b281b2aaab66e4d76dfc1010b2fb5 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
index a641dee545..f076ea0867 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
@@ -97,7 +97,7 @@ public abstract class AbstractPlotRenderer<TLane extends PlotLane, TColor> {
final int myLaneX = laneC(myLane);
final TColor myColor = laneColor(myLane);
- int maxCenter = 0;
+ int maxCenter = myLaneX;
for (final TLane passingLane : (TLane[]) commit.passingLanes) {
final int cx = laneC(passingLane);
final TColor c = laneColor(passingLane);
@@ -154,7 +154,7 @@ public abstract class AbstractPlotRenderer<TLane extends PlotLane, TColor> {
}
final String msg = commit.getShortMessage();
- drawText(msg, textx + dotSize + n*2, h / 2);
+ drawText(msg, textx + dotSize, h / 2);
}
/**