Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-12-08 11:04:15 -0500
committerAlexander Kurtakov2017-12-08 11:04:15 -0500
commit6b6af647302601f66d4840df78bd040356a44654 (patch)
treec3f18616f33107dea61459ee257cf4a5fc363e48
parent79bf7f6ece7888d806036282874fb1f1c7d21250 (diff)
downloadeclipse.platform.team-I20171211-2000.tar.gz
eclipse.platform.team-I20171211-2000.tar.xz
eclipse.platform.team-I20171211-2000.zip
Bug 526886 - Network connections preferences are not visibleI20171211-2000I20171210-2000I20171209-1500I20171209-1020I20171208-2000
The two label providers were also color providers but implementing only getBackround which is a recipe for this kind of issues as whenever one implements background he should take care of foreground also to ensure readability of the text. Furthermore hardcoding colors doesn't play well with e4 theming engine and can lead to unreadable or just plain ugly lookgin interfaces. Change-Id: I8dbc667942a43079e29f97dca4b5982e68a73c1c Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java22
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyEntriesLabelProvider.java22
2 files changed, 2 insertions, 42 deletions
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java
index f9ab37002..37e621610 100644
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java
+++ b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java
@@ -16,13 +16,11 @@ package org.eclipse.ui.internal.net;
import org.eclipse.core.internal.net.ProxySelector;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.TableColumn;
public class NonProxyHostsLabelProvider extends BaseLabelProvider implements
- ITableLabelProvider, IColorProvider {
+ ITableLabelProvider {
public NonProxyHostsLabelProvider() {
super();
@@ -68,22 +66,4 @@ public class NonProxyHostsLabelProvider extends BaseLabelProvider implements
column.setResizable(true);
}
}
-
- @Override
- public Color getBackground(Object element) {
- if (element instanceof ProxyBypassData) {
- String provider = ((ProxyBypassData) element).getSource();
- if (!ProxySelector.canSetBypassHosts(provider)) {
- return Display.getCurrent().getSystemColor(
- SWT.COLOR_INFO_BACKGROUND);
- }
- }
- return null;
- }
-
- @Override
- public Color getForeground(Object element) {
- return null;
- }
-
}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyEntriesLabelProvider.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyEntriesLabelProvider.java
index 97c35121f..727559211 100644
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyEntriesLabelProvider.java
+++ b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyEntriesLabelProvider.java
@@ -14,13 +14,11 @@ import org.eclipse.core.internal.net.ProxyData;
import org.eclipse.core.internal.net.ProxySelector;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.TableColumn;
public class ProxyEntriesLabelProvider extends BaseLabelProvider implements
- ITableLabelProvider, IColorProvider {
+ ITableLabelProvider {
public ProxyEntriesLabelProvider() {
super();
@@ -97,22 +95,4 @@ public class ProxyEntriesLabelProvider extends BaseLabelProvider implements
column.setResizable(true);
}
}
-
- @Override
- public Color getBackground(Object element) {
- if (element instanceof ProxyData) {
- String provider = ((ProxyData) element).getSource();
- if (!ProxySelector.canSetProxyData(provider)) {
- return Display.getCurrent().getSystemColor(
- SWT.COLOR_INFO_BACKGROUND);
- }
- }
- return null;
- }
-
- @Override
- public Color getForeground(Object element) {
- return null;
- }
-
}

Back to the top