summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-11-15 15:08:32 -0500
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-11-15 15:08:32 -0500
commit592d29b2d91e140852d4120c2dafd39589e57883 (patch)
treee7a2ae4c432db02fea3c0663153e202aac030adb
parentdcbdf5d41e96b613ca9be54249e40475fb78e5ed (diff)
downloadeclipse.platform.swt-592d29b2d91e140852d4120c2dafd39589e57883.tar.gz
eclipse.platform.swt-592d29b2d91e140852d4120c2dafd39589e57883.tar.xz
eclipse.platform.swt-592d29b2d91e140852d4120c2dafd39589e57883.zip
Bug 393723 - [GTK3] wrong foreground in Eclipse editor area unselected tabs
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 6d17246bde..99345bbb7d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -612,6 +612,17 @@ void checkBackground () {
} while (true);
}
+void checkForeground () {
+ /*
+ * Feature in GTK 3. The widget foreground is inherited from the immediate
+ * parent. This is not the expected behavior for SWT. The fix is to avoid
+ * the inheritance by explicitly setting the default foreground on the widget.
+ */
+ if (OS.GTK3) {
+ setForegroundColor (topHandle (), display.COLOR_WIDGET_FOREGROUND);
+ }
+}
+
void checkBorder () {
if (getBorderWidth () == 0) style &= ~SWT.BORDER;
}
@@ -629,6 +640,7 @@ void createWidget (int index) {
checkOrientation (parent);
super.createWidget (index);
checkBackground ();
+ checkForeground ();
if ((state & PARENT_BACKGROUND) != 0) setParentBackground ();
checkBuffered ();
showWidget ();