Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2016-09-14 20:54:25 +0000
committerSergey Prigogin2016-09-14 20:54:25 +0000
commitde4bc442323d5292a11a22bf5ae9119245be762a (patch)
tree70099b85e187c8346cec802fc557ec2fed9264f9 /org.eclipse.jface.text
parent56062ff827df2de5482b19cd88bc9eefe06439cc (diff)
downloadeclipse.platform.text-de4bc442323d5292a11a22bf5ae9119245be762a.tar.gz
eclipse.platform.text-de4bc442323d5292a11a22bf5ae9119245be762a.tar.xz
eclipse.platform.text-de4bc442323d5292a11a22bf5ae9119245be762a.zip
Bug 501451: Colors in appendStyleSheet should not be hard-coded.
Diffstat (limited to 'org.eclipse.jface.text')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java
index 04e4903c8aa..1e49e72a36b 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java
@@ -166,7 +166,7 @@ public class HTMLPrinter {
pageProlog.append("<html>"); //$NON-NLS-1$
- appendStyleSheet(pageProlog, styleSheet);
+ appendStyleSheet(pageProlog, styleSheet, fgRGB, bgRGB);
appendColors(pageProlog, fgRGB, bgRGB);
@@ -223,16 +223,16 @@ public class HTMLPrinter {
}
}
- private static void appendStyleSheet(StringBuffer buffer, String styleSheet) {
+ private static void appendStyleSheet(StringBuffer buffer, String styleSheet, RGB fgRGB, RGB bgRGB) {
if (styleSheet == null)
return;
// workaround for https://bugs.eclipse.org/318243
StringBuffer fg= new StringBuffer();
- appendColor(fg, FG_COLOR_RGB);
+ appendColor(fg, fgRGB);
styleSheet= styleSheet.replaceAll("InfoText", fg.toString()); //$NON-NLS-1$
StringBuffer bg= new StringBuffer();
- appendColor(bg, BG_COLOR_RGB);
+ appendColor(bg, bgRGB);
styleSheet= styleSheet.replaceAll("InfoBackground", bg.toString()); //$NON-NLS-1$
buffer.append("<head><style CHARSET=\"ISO-8859-1\" TYPE=\"text/css\">"); //$NON-NLS-1$

Back to the top