Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jface.text/src')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java21
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java17
2 files changed, 28 insertions, 10 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java
index 8e39c1391d9..2355def6175 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java
@@ -31,11 +31,15 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.jface.internal.text.TableOwnerDrawSupport;
+import org.eclipse.jface.preference.JFacePreferences;
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.jface.resource.JFaceColors;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.viewers.StyledString;
@@ -311,13 +315,20 @@ class CompletionProposalPopup2 implements IContentAssistListener2 {
});
}
- fProposalShell.setBackground(control.getDisplay().getSystemColor(SWT.COLOR_BLACK));
+ ColorRegistry colorRegistry= JFaceResources.getColorRegistry();
+ Color background= colorRegistry.get(JFacePreferences.CONTENT_ASSIST_BACKGROUND_COLOR);
+ if (background == null) {
+ background= JFaceColors.getInformationViewerBackgroundColor(Display.getDefault());
+ }
- Color c= control.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND);
- fProposalTable.setBackground(c);
+ Color foreground= colorRegistry.get(JFacePreferences.CONTENT_ASSIST_FOREGROUND_COLOR);
+ if (foreground == null) {
+ foreground= JFaceColors.getInformationViewerBackgroundColor(Display.getDefault());
+ }
- c= control.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND);
- fProposalTable.setForeground(c);
+ fProposalShell.setBackground(background);
+ fProposalTable.setBackground(background);
+ fProposalTable.setForeground(foreground);
fProposalTable.addSelectionListener(new SelectionListener() {
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
index 93fa19be112..92052d43d4f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
@@ -75,6 +75,7 @@ import org.eclipse.jface.contentassist.IContentAssistSubjectControl;
import org.eclipse.jface.internal.text.InformationControlReplacer;
import org.eclipse.jface.internal.text.TableOwnerDrawSupport;
import org.eclipse.jface.preference.JFacePreferences;
+import org.eclipse.jface.resource.JFaceColors;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.Geometry;
import org.eclipse.jface.viewers.StyledString;
@@ -654,13 +655,19 @@ class CompletionProposalPopup implements IContentAssistListener {
}
});
- fProposalShell.setBackground(control.getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ Color background= getBackgroundColor(control);
+ if (background == null) {
+ background= JFaceColors.getInformationViewerBackgroundColor(Display.getDefault());
+ }
- Color c= getBackgroundColor(control);
- fProposalTable.setBackground(c);
+ Color foreground= getForegroundColor(control);
+ if (foreground == null) {
+ foreground= JFaceColors.getInformationViewerBackgroundColor(Display.getDefault());
+ }
- c= getForegroundColor(control);
- fProposalTable.setForeground(c);
+ fProposalShell.setBackground(background);
+ fProposalTable.setBackground(background);
+ fProposalTable.setForeground(foreground);
fProposalTable.addSelectionListener(new SelectionListener() {

Back to the top