Correct the color drag in HildonColorChooser
authorClaudio Saavedra <csaavedra@igalia.com>
Wed, 24 Jun 2009 10:04:15 +0000 (13:04 +0300)
committerClaudio Saavedra <csaavedra@igalia.com>
Wed, 24 Jun 2009 10:07:05 +0000 (13:07 +0300)
* hildon/hildon-color-chooser.c
(hildon_color_chooser_pointer_motion): Take the widget allocation
into account.

Fixes: NB#124385 (Unable to select exact point in color mixing box
in color palette dialog)

ChangeLog
hildon/hildon-color-chooser.c

index ef4d1a0..67b6e39 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-06-24  Claudio Saavedra  <csaavedra@igalia.com>
+
+       * hildon/hildon-color-chooser.c
+       (hildon_color_chooser_pointer_motion): Take the widget allocation
+       into account.
+
+       Fixes: NB#124385 (Unable to select exact point in color mixing box
+       in color palette dialog)
+
 2009-06-23  Alejandro G. Castro  <alex@igalia.com>
 
        * hildon/hildon-pannable-area.c (hildon_pannable_area_class_init)
index 8e8e075..3f4473f 100644 (file)
@@ -705,8 +705,8 @@ hildon_color_chooser_pointer_motion             (GtkWidget *widget,
 
     g_assert (priv);
 
-    x = (gint) event->x;
-    y = (gint) event->y;
+    x = (int) event->x + widget->allocation.x;
+    y = (int) event->y + widget->allocation.y;
 
     if (priv->mousestate == 1) {
         if (x >= priv->spa.x && x <= priv->spa.x + priv->spa.width &&