aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Rolka2013-12-13 13:35:23 (EST)
committerGerrit Code Review @ Eclipse.org2014-01-10 08:42:55 (EST)
commitaa83bea8cf40e5aa399a8065bba001b25e95d2ff (patch)
tree20681ff29bf3d97d3d7de679bf742de40f13e035
parent369515f6101808cc25cb3b2035861d5c54c13dad (diff)
downloadeclipse.platform.ui-aa83bea8cf40e5aa399a8065bba001b25e95d2ff.zip
eclipse.platform.ui-aa83bea8cf40e5aa399a8065bba001b25e95d2ff.tar.gz
eclipse.platform.ui-aa83bea8cf40e5aa399a8065bba001b25e95d2ff.tar.bz2
Bug 423704 - [CSS] Update the classic CSS stylesheets for properrefs/changes/10/19810/2
Font/Color definitions Change-Id: I221720944ba1aec37df294f30d785f7f68475c71 Signed-off-by: Daniel Rolka <daniel.rolka@pl.ibm.com>
-rw-r--r--bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelper.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelper.java b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelper.java
index 7c1b92a..ddd420e 100644
--- a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelper.java
+++ b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelper.java
@@ -23,8 +23,6 @@ import org.eclipse.e4.ui.css.core.css2.CSS2ColorHelper;
import org.eclipse.e4.ui.css.core.css2.CSS2RGBColorImpl;
import org.eclipse.e4.ui.css.core.dom.properties.Gradient;
import org.eclipse.e4.ui.css.core.engine.CSSEngine;
-import org.eclipse.e4.ui.css.core.resources.CSSResourcesHelpers;
-import org.eclipse.e4.ui.css.core.resources.IResourcesRegistry;
import org.eclipse.e4.ui.internal.css.swt.CSSActivator;
import org.eclipse.e4.ui.internal.css.swt.definition.IColorAndFontProvider;
import org.eclipse.swt.SWT;
@@ -236,16 +234,17 @@ public class CSSSWTColorHelper {
return gradient;
}
- public static Color[] getSWTColors(Gradient grad, Display display, CSSEngine engine) {
+ @SuppressWarnings("rawtypes")
+ public static Color[] getSWTColors(Gradient grad, Display display,
+ CSSEngine engine) throws Exception {
List values = grad.getValues();
- IResourcesRegistry registry = engine.getResourcesRegistry();
Color[] colors = new Color[values.size()];
for (int i = 0; i < values.size(); i++) {
CSSPrimitiveValue value = (CSSPrimitiveValue) values.get(i);
//We rely on the fact that when a gradient is created, it's colors are converted and in the registry
//TODO see bug #278077
- Color color = (Color) registry.getResource(Color.class, CSSResourcesHelpers.getCSSPrimitiveValueKey(value));
+ Color color = (Color) engine.convert(value, Color.class, display);
colors[i] = color;
}
return colors;