aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Thondapu2013-02-07 05:03:37 (EST)
committerCarolyn MacLeod2013-04-09 10:49:41 (EDT)
commitb8ce6984ca175f11e65ded887ef60141930cd419 (patch)
treed2172ab2e5fe615d17ac2b7141f486973d9189a2
parent5dcd1a67ae177a273b63f22dc0ca210c22217118 (diff)
downloadeclipse.platform.swt-b8ce6984ca175f11e65ded887ef60141930cd419.zip
eclipse.platform.swt-b8ce6984ca175f11e65ded887ef60141930cd419.tar.gz
eclipse.platform.swt-b8ce6984ca175f11e65ded887ef60141930cd419.tar.bz2
Bug 399543 ColorDialog ignores existing choice of color when GTK version
is >= 3.4.0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
index 4f3970d..70da8c6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
@@ -167,7 +167,12 @@ public RGB open () {
}
OS.gtk_color_selection_set_has_palette (colorsel, true);
} else {
- OS.gtk_color_chooser_set_use_alpha (handle, false);
+ if (rgb != null) {
+ rgba.red = (double) rgb.red / 255;
+ rgba.green = (double) rgb.green / 255;
+ rgba.blue = (double) rgb.blue / 255;
+ }
+ OS.gtk_color_chooser_set_use_alpha (handle, false);
OS.gtk_color_chooser_set_rgba (handle, rgba);
}
@@ -236,7 +241,7 @@ public RGB open () {
green = (color.green >> 8) & 0xFF;
blue = (color.blue >> 8) & 0xFF;
}
- rgb = new RGB (red, green, blue);
+ rgb = new RGB (red, green, blue);
}
long /*int*/ settings = OS.gtk_settings_get_default ();
if (settings != 0) {