Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2015-03-09 10:40:15 +0000
committerLars Vogel2015-03-09 10:40:15 +0000
commit4747105206dd0f05aefce40351d119f0b41c8e7f (patch)
treee54639cd7603c7aeeb683d944e762742d102c4b4
parentb1f18eb17afd0d56e4403f658f74648c4f88e87d (diff)
downloadeclipse.platform.ui-4747105206dd0f05aefce40351d119f0b41c8e7f.tar.gz
eclipse.platform.ui-4747105206dd0f05aefce40351d119f0b41c8e7f.tar.xz
eclipse.platform.ui-4747105206dd0f05aefce40351d119f0b41c8e7f.zip
Bug 461688 - [Tests] org.eclipse.swt.graphics.RGBA cannot be cast to
org.eclipse.swt.graphics.RGB Change-Id: I75cf00a29cee1ae39b8bedcddef75b13454fd0f4 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java
index 6940cdc1d3c..dfe30ce0dd6 100644
--- a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java
+++ b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Angelo Zerr and others.
+ * Copyright (c) 2008, 2015 Angelo Zerr and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
* Angelo Zerr <angelo.zerr@gmail.com> - initial API and implementation
* IBM Corporation
* Kai Toedter - added radial gradient support
+ * Lars Vogel <Lars.Vogel@vogella.com> - Bug 461688
*******************************************************************************/
package org.eclipse.e4.ui.css.swt.properties;
@@ -34,6 +35,7 @@ import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.PaletteData;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.RGBA;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
@@ -162,9 +164,8 @@ public class GradientBackgroundListener implements Listener {
List<Color> colors = new ArrayList<Color>();
for (Iterator<?> iterator = grad.getRGBs().iterator(); iterator
.hasNext();) {
- RGB rgb = (RGB) iterator.next();
- Color color = new Color(control.getDisplay(), rgb.red,
- rgb.green, rgb.blue);
+ RGBA rgba = (RGBA) iterator.next();
+ Color color = new Color(control.getDisplay(), rgba.rgb.red, rgba.rgb.green, rgba.rgb.blue);
colors.add(color);
}
fillGradient(gc, new Rectangle(0, 0, x, y), colors,

Back to the top