Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2017-04-24 17:01:28 -0400
committerLeo Ufimtsev2017-04-24 17:32:40 -0400
commita1d67d4a81f1e3edd9e4ba5967ea9fe2b20fd7c3 (patch)
treebb9a58046ca585c819cd6e874b0fc9c144148093
parent1decb507efc4c69c54a27f5ded7d90c1ee296140 (diff)
downloadeclipse.platform.text-a1d67d4a81f1e3edd9e4ba5967ea9fe2b20fd7c3.tar.gz
eclipse.platform.text-a1d67d4a81f1e3edd9e4ba5967ea9fe2b20fd7c3.tar.xz
eclipse.platform.text-a1d67d4a81f1e3edd9e4ba5967ea9fe2b20fd7c3.zip
Bug 507062 - Fix black strip of color in JavaDocHover (patch 2)I20170425-0910
Use information colors api in JFaceColor instead of those in workbench. This makes the Javadoc dialogue's strip at the bottom have the same consistent color with all other dialogues in eclipse. (e.g same as in code completion in ctrl+space). See screenshot 'patch 2' in bug report. Tests: - Gtk: Javadoc hover, strip at the bottom looks like regular part of Eclipse. - Looks consistent on Dark and Light theme. - Win/Cocoa: Javadoc hover, strip at the bottom looks same as before. Note: The previous patch introduced ability to customize colour of this strip at the bottom. But this made it inconsistent with other eclipse dialogues like code-completion etc. This patch reverts customization in favour of keeping things simple and working. Patchset 4: - Removed null check as api never returns null. Change-Id: Ia6ebf0066b6f241675b2bcbac4c29824270f3415 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, 3 insertions, 10 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 320932d27..2a9a5b057 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,7 +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.JFaceColors;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.Geometry;
@@ -183,15 +183,8 @@ public abstract class AbstractInformationControl implements IInformationControl,
fShell= new Shell(parentShell, shellStyle);
Display display= fShell.getDisplay();
- 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);
- }
+ Color foreground= JFaceColors.getInformationViewerForegroundColor(display);
+ Color background= JFaceColors.getInformationViewerBackgroundColor(display);
setColor(fShell, foreground, background);
GridLayout layout= new GridLayout(1, false);

Back to the top