diff options
author | Leo Ufimtsev | 2016-09-14 19:57:02 +0000 |
---|---|---|
committer | Leo Ufimtsev | 2016-09-14 19:57:02 +0000 |
commit | 043666743b59bda1ebadb96816b6493d8f8f4605 (patch) | |
tree | 70099b85e187c8346cec802fc557ec2fed9264f9 | |
parent | c009accb9bfb0ddee3aa26dc28bf4248793d6c6d (diff) | |
download | eclipse.platform.text-043666743b59bda1ebadb96816b6493d8f8f4605.tar.gz eclipse.platform.text-043666743b59bda1ebadb96816b6493d8f8f4605.tar.xz eclipse.platform.text-043666743b59bda1ebadb96816b6493d8f8f4605.zip |
Bug 501451: Colors in appendStyleSheet should not be hard-coded.
See bug for screenshots that demonstrate issue.
Change-Id: Ic78e694447bf35f74a97cff76289daf75c5ca93c
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=501451
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java | 8 |
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$ |