summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorKevin Sawicki2011-03-25 16:24:27 (EDT)
committer Kevin Sawicki2011-03-25 16:24:27 (EDT)
commit1cb3f9c930eac97fea7d40792c44348d36fbf17a (patch)
tree8c502b5b94230ed4796ef3bfa50ee18f6ecdab0b
parent87dcd601a565272c3f6bf8cde1621fde08f5bd97 (diff)
downloadegit-1cb3f9c930eac97fea7d40792c44348d36fbf17a.zip
egit-1cb3f9c930eac97fea7d40792c44348d36fbf17a.tar.gz
egit-1cb3f9c930eac97fea7d40792c44348d36fbf17a.tar.bz2
[historyView] Set anti-aliasing value to SWT.ON in SWTPlotRendererrefs/changes/31/2931/2
Bug: 341002 Change-Id: Ibac53b227b33830d02d1448f43df0a3f16b522e4 Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/SWTPlotRenderer.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/SWTPlotRenderer.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/SWTPlotRenderer.java
index c93334c..82f1525 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/SWTPlotRenderer.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/SWTPlotRenderer.java
@@ -19,6 +19,7 @@ import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.revplot.AbstractPlotRenderer;
import org.eclipse.jgit.revplot.PlotCommit;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.GC;
@@ -47,6 +48,8 @@ class SWTPlotRenderer extends AbstractPlotRenderer<SWTLane, Color> {
private int textHeight;
+ private boolean enableAntialias = true;
+
GC g;
int cellX;
@@ -72,6 +75,14 @@ class SWTPlotRenderer extends AbstractPlotRenderer<SWTLane, Color> {
@SuppressWarnings("unchecked")
void paint(final Event event, Ref actHeadRef) {
g = event.gc;
+
+ if (this.enableAntialias)
+ try {
+ g.setAntialias(SWT.ON);
+ } catch (SWTException e) {
+ this.enableAntialias = false;
+ }
+
this.headRef = actHeadRef;
cellX = event.x;
cellY = event.y;