ryuan pushed a commit to branch master.

commit 93d6ddf36bc7aa4df86d92954e3f350ec6c5aa0e
Author: Ryuan Choi <[email protected]>
Date:   Wed Jun 5 09:01:53 2013 +0900

    elm_colorselector: Update color bar when color was picked by color picker.
---
 ChangeLog                   | 4 ++++
 NEWS                        | 1 +
 src/lib/elm_colorselector.c | 9 +++++----
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d898765..8da13bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1380,3 +1380,7 @@
 2013-05-30 ChunEon Park
         * Fix the mapbuf to be enabled before it's content is entirely rendered
         once.
+
+2013-06-05 Ryuan Choi (ryuan)
+
+        * Fix elm_colorselector does not update color bar when picker changed 
color.
diff --git a/NEWS b/NEWS
index a41f745..60df92a 100644
--- a/NEWS
+++ b/NEWS
@@ -236,6 +236,7 @@ Fixes:
    * Fix colorselector color change but when palette item is selected.
    * Fix elm_colorselector does not emit "changed" when clicked color palatte.
    * Fix elm_mapbuf to be enabled before it's content is entirely rendered 
once.     this will reduce the cases that content is not updated in the screen.
+   * Fix elm_colorselector does not update color bar when picker changed color.
 
 Removals:
 
diff --git a/src/lib/elm_colorselector.c b/src/lib/elm_colorselector.c
index bedf184..df33295 100644
--- a/src/lib/elm_colorselector.c
+++ b/src/lib/elm_colorselector.c
@@ -522,6 +522,7 @@ _mouse_up_cb(void *data, int type __UNUSED__, void *event 
__UNUSED__)
 {
    const unsigned int *pixels;
    Evas_Object *o = data;
+   int r, g, b;
 
    /* mouse up => check it */
    ELM_COLORSELECTOR_DATA_GET(o, sd);
@@ -533,11 +534,11 @@ _mouse_up_cb(void *data, int type __UNUSED__, void *event 
__UNUSED__)
    sd->grab.mouse_motion = ecore_event_handler_add(ECORE_X_RAW_MOTION, 
_mouse_grab_pixels, o);
 
    pixels = evas_object_image_data_get(sd->picker_display, EINA_FALSE);
-   sd->a = 0xff;
-   sd->r = (pixels[17 * 9 + 9] >> 16) & 0xFF;
-   sd->g = (pixels[17 * 9 + 9] >> 8) & 0xFF;
-   sd->b = pixels[17 * 9 + 9] & 0xFF;
+   r = (pixels[17 * 9 + 9] >> 16) & 0xFF;
+   g = (pixels[17 * 9 + 9] >> 8) & 0xFF;
+   b = pixels[17 * 9 + 9] & 0xFF;
 
+   _colors_set(o, r, g, b, 0xFF);
    _color_picker_init(sd);
 
    return EINA_TRUE;

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j

Reply via email to