Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java
index 90fdeaea37..8bbf942ad7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java
@@ -565,9 +565,19 @@ void setFontDescription (long /*int*/ font) {
}
void setForegroundColor (GdkColor color) {
- setForegroundColor (handle, color);
- if (labelHandle != 0) setForegroundColor (labelHandle, color);
- if (imageHandle != 0) setForegroundColor (imageHandle, color);
+ if (OS.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
+ GdkRGBA rgba = null;
+ if (color != null) {
+ rgba = display.toGdkRGBA (color);
+ }
+ parent.setForegroundColor (handle, rgba);
+ if (labelHandle != 0) parent.setForegroundColor (labelHandle, rgba);
+ if (imageHandle != 0) parent.setForegroundColor (imageHandle, rgba);
+ } else {
+ setForegroundColor (handle, color);
+ if (labelHandle != 0) setForegroundColor (labelHandle, color);
+ if (imageHandle != 0) setForegroundColor (imageHandle, color);
+ }
}
/**

Back to the top