Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 319986
Collapse All | Expand All

(-)src/org/eclipse/dltk/ui/text/HTMLUtils.java (-1 / +6 lines)
Lines 19-25 Link Here
19
public class HTMLUtils {
19
public class HTMLUtils {
20
20
21
	private static RGB BG_COLOR_RGB = null;
21
	private static RGB BG_COLOR_RGB = null;
22
22
	private static RGB FG_COLOR_RGB= new RGB(0, 0, 0); // RGB value of info fg color on WindowsXP
23
	static {
23
	static {
24
		final Display display = Display.getDefault();
24
		final Display display = Display.getDefault();
25
		if (display != null && !display.isDisposed()) {
25
		if (display != null && !display.isDisposed()) {
Lines 31-36 Link Here
31
					public void run() {
31
					public void run() {
32
						BG_COLOR_RGB = display.getSystemColor(
32
						BG_COLOR_RGB = display.getSystemColor(
33
								SWT.COLOR_INFO_BACKGROUND).getRGB();
33
								SWT.COLOR_INFO_BACKGROUND).getRGB();
34
						FG_COLOR_RGB = display.getSystemColor(
35
								SWT.COLOR_INFO_FOREGROUND).getRGB();
34
					}
36
					}
35
				});
37
				});
36
			} catch (SWTError err) {
38
			} catch (SWTError err) {
Lines 50-53 Link Here
50
		}
52
		}
51
	}
53
	}
52
54
55
	public static RGB getFgColor() {
56
		return FG_COLOR_RGB;
57
	}
53
}
58
}
(-)src/org/eclipse/dltk/ui/text/completion/HTMLPrinter.java (-3 / +5 lines)
Lines 57-63 Link Here
57
	}
57
	}
58
58
59
	public static void insertPageProlog(StringBuffer buffer, int position,
59
	public static void insertPageProlog(StringBuffer buffer, int position,
60
			RGB bgRGB, String styleSheet) {
60
			RGB bgRGB, RGB fgRGB, String styleSheet) {
61
61
62
		if (bgRGB == null)
62
		if (bgRGB == null)
63
			insertPageProlog(buffer, position, styleSheet);
63
			insertPageProlog(buffer, position, styleSheet);
Lines 68-74 Link Here
68
68
69
			appendStyleSheet(pageProlog, styleSheet);
69
			appendStyleSheet(pageProlog, styleSheet);
70
70
71
			pageProlog.append("<body text=\"#000000\" bgcolor=\""); //$NON-NLS-1$
71
			pageProlog.append("<body text=\""); //$NON-NLS-1$
72
			appendColor(pageProlog, fgRGB);
73
			pageProlog.append("\" bgcolor=\""); //$NON-NLS-1$
72
			appendColor(pageProlog, bgRGB);
74
			appendColor(pageProlog, bgRGB);
73
			pageProlog.append("\">"); //$NON-NLS-1$
75
			pageProlog.append("\">"); //$NON-NLS-1$
74
76
Lines 130-136 Link Here
130
132
131
	public static void insertPageProlog(StringBuffer buffer, int position,
133
	public static void insertPageProlog(StringBuffer buffer, int position,
132
			String styleSheet) {
134
			String styleSheet) {
133
		insertPageProlog(buffer, position, HTMLUtils.getBgColor(), styleSheet);
135
		insertPageProlog(buffer, position, HTMLUtils.getBgColor(), HTMLUtils.getFgColor(), styleSheet);
134
	}
136
	}
135
137
136
	public static void addPageProlog(StringBuffer buffer) {
138
	public static void addPageProlog(StringBuffer buffer) {

Return to bug 319986