Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2016-11-29 16:53:21 +0000
committerAlexander Kurtakov2016-11-29 17:10:21 +0000
commit355eaf9dfbaa1035a9dc8e17f2ceb92b5f620ff7 (patch)
tree321a064f2a0d2a18f3b221f5e6cabf25ff66558f
parent6ac9ef9309a19dca183c39b074ec5f5f92357460 (diff)
downloadeclipse.platform.text-355eaf9dfbaa1035a9dc8e17f2ceb92b5f620ff7.tar.gz
eclipse.platform.text-355eaf9dfbaa1035a9dc8e17f2ceb92b5f620ff7.tar.xz
eclipse.platform.text-355eaf9dfbaa1035a9dc8e17f2ceb92b5f620ff7.zip
Use INFO color as defined in: Bug 505738 – Define a information hover color which JDT, CDT or others can use Change-Id: I9bea571f48cd8ac64224062a2fbdbd5ec5fb0905 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=507062 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
index 5a94a0ba0d5..af42edc8126 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
@@ -45,6 +45,7 @@ import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.internal.text.revisions.Colors;
+import org.eclipse.jface.resource.ColorRegistry;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.Geometry;
@@ -181,8 +182,16 @@ public abstract class AbstractInformationControl implements IInformationControl,
fResizable= (shellStyle & SWT.RESIZE) != 0;
fShell= new Shell(parentShell, shellStyle);
Display display= fShell.getDisplay();
- Color foreground= display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
- Color background= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
+
+ ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
+ Color foreground= colorRegistry.get("org.eclipse.ui.workbench.HOVER_FOREGROUND"); //$NON-NLS-1$
+ if (foreground == null) {
+ foreground = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
+ }
+ Color background= colorRegistry.get("org.eclipse.ui.workbench.HOVER_BACKGROUND"); //$NON-NLS-1$
+ if (background == null) {
+ background = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
+ }
setColor(fShell, foreground, background);
GridLayout layout= new GridLayout(1, false);

Back to the top