From 36be24500443ce1efe4da1ff6663ee6177ae74e1 Mon Sep 17 00:00:00 2001 From: Solganik Alexander Date: Sat, 26 Mar 2016 12:19:57 +0300 Subject: [PATCH] Bug 435726 - Dont set SWT colors for foreground on active element. When dark theme is in use outline and project explorer background expected to be dark, regardless of globally (OS level) selected SWT scheme. So for active elements foreground always return NULL which will result in default colors to be displayed. For inactive element, continue displaying them in grey, as grey is inactive color for both dark and default theme. Change-Id: I91b20b0327e0008a2aa01573981f217a609e3bbc Signed-off-by: Solganik Alexander --- .../eclipse/cdt/internal/ui/viewsupport/CUILabelProvider.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CUILabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CUILabelProvider.java index f3733dbca9a..0155abfd3dc 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CUILabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CUILabelProvider.java @@ -40,7 +40,6 @@ public class CUILabelProvider extends LabelProvider implements IColorProvider, I private int fImageFlags; private long fTextFlags; private Color fInactiveColor; - private Color fDefaultColor; /** * Creates a new label provider with default flags. @@ -238,12 +237,11 @@ public class CUILabelProvider extends LabelProvider implements IColorProvider, I if (!sref.isActive()) { if (fInactiveColor == null && Display.getCurrent() != null) { fInactiveColor= CUIPlugin.getStandardDisplay().getSystemColor(SWT.COLOR_DARK_GRAY); - fDefaultColor= CUIPlugin.getStandardDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND); } return fInactiveColor; } } - return fDefaultColor; + return null; } @Override