summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ui/src
diff options
context:
space:
mode:
authorJonathan Nieder <jrn@google.com>2014-12-10 15:22:08 -0800
committerJonathan Nieder <jrn@google.com>2014-12-10 15:30:21 -0800
commit64162ab40d13b33083ce3f96072a6327346ee3b0 (patch)
treef8415753043bf57d8df81a1951b8c24752de5751 /org.eclipse.jgit.ui/src
parent82f191bd79beb9ddbce1f35583f88df08fb53440 (diff)
downloadjgit-64162ab40d13b33083ce3f96072a6327346ee3b0.tar.gz
jgit-64162ab40d13b33083ce3f96072a6327346ee3b0.zip
AWTPlotRenderer: use float arithmetic instead of double followed by a conversion
Multiplying by 0.9 and converting back to float is slightly more complicated and achieves the same effect as multiplying by the float 0.9f directly. Change-Id: I555863bb1251badee8887b9b93c5463eda0a3509 Signed-off-by: Jonathan Nieder <jrn@google.com>
Diffstat (limited to 'org.eclipse.jgit.ui/src')
-rw-r--r--org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
index c1168f17f3..632114faac 100644
--- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
+++ b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
@@ -170,9 +170,9 @@ final class AWTPlotRenderer extends AbstractPlotRenderer<SwingLane, Color>
}
if (ref.getPeeledObjectId() != null) {
float[] colorComponents = g.getBackground().getRGBColorComponents(null);
- colorComponents[0] *= 0.9;
- colorComponents[1] *= 0.9;
- colorComponents[2] *= 0.9;
+ colorComponents[0] *= 0.9f;
+ colorComponents[1] *= 0.9f;
+ colorComponents[2] *= 0.9f;
g.setBackground(new Color(colorComponents[0],colorComponents[1],colorComponents[2]));
}
if (txt.length() > 12)