summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-11-07 09:46:23 -0500
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-11-07 09:46:23 -0500
commit87e58488da30e8b2e25a699114ff6b6d32d823a7 (patch)
tree035fe990a57639da7fe64e2c89c9fb93ddc17f8d
parentb4ab0712b5c3b47e9b394169d523d13c0612a44a (diff)
downloadeclipse.platform.swt-87e58488da30e8b2e25a699114ff6b6d32d823a7.tar.gz
eclipse.platform.swt-87e58488da30e8b2e25a699114ff6b6d32d823a7.tar.xz
eclipse.platform.swt-87e58488da30e8b2e25a699114ff6b6d32d823a7.zip
setBackground() junit test failing
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
index 5ad04507ee..22f5034ab4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
@@ -1065,16 +1065,19 @@ void sendSelectionEvent () {
public void setBackground(Color color) {
super.setBackground(color);
+ if (!OS.GTK3) {
+ if (((style & SWT.CALENDAR) != 0) && color == null) {
+ OS.gtk_widget_modify_base(handle, 0, null);
+ }
+ }
bg = color;
if (text != null) text.setBackground(color);
if (popupCalendar != null) popupCalendar.setBackground(color);
}
void setBackgroundColor (GdkColor color) {
- if ((style & SWT.CALENDAR) != 0) {
- if (!OS.GTK3) {
- OS.gtk_widget_modify_base(handle, 0, color);
- }
+ if ((style & SWT.CALENDAR) != 0 && !OS.GTK3) {
+ OS.gtk_widget_modify_base(handle, 0, color);
} else {
super.setBackgroundColor (color);
}