forked from enlightenment/efl
elm_colorselector: Can't receive "changed" signal when clicked color palette.
As document mentioned, "changed" should be emitted when the color value is changed. So, this patch emits "changed" signal when color value is really changed. In addition, fixed some formatting issue of test_colorselector.
This commit is contained in:
parent
f2ce520e21
commit
cbe6ae16b0
|
@ -1360,3 +1360,7 @@
|
|||
2013-05-23 Daniel Juyung Seo (SeoZ)
|
||||
|
||||
* Fix colorselector color change but when palette item is selected.
|
||||
|
||||
2013-05-23 Ryuan Choi (ryuan)
|
||||
|
||||
* Fix elm_colorselector does not emit "changed" when clicked color palatte.
|
||||
|
|
|
@ -231,6 +231,7 @@ Fixes:
|
|||
* Fix remained ecore timer issue when gesture layer was deleted.
|
||||
* Fix ctxpopup can't be called again in the mobile mode entry.
|
||||
* Fix colorselector color change but when palette item is selected.
|
||||
* Fix elm_colorselector does not emit "changed" when clicked color palatte.
|
||||
|
||||
Removals:
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@ _colorselector_clicked_cb(void *data, Evas_Object *obj,
|
|||
}
|
||||
|
||||
static void
|
||||
_colorpalette_clicked_cb(void *data, Evas_Object *obj __UNUSED__,
|
||||
_colorpalette_clicked_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
|
||||
void *event_info)
|
||||
{
|
||||
int r = 0, g = 0, b = 0 ,a = 0;
|
||||
Elm_Object_Item *color_it = (Elm_Object_Item *) event_info;
|
||||
elm_colorselector_palette_item_color_get(color_it, &r, &g, &b, &a);
|
||||
evas_object_color_set((Evas_Object *) data, r, g, b , a);
|
||||
printf("Selected Color Palette [r=%d g=%d b=%d a=%d]\n", r, g, b, a);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -383,6 +383,9 @@ _colors_set(Evas_Object *obj,
|
|||
|
||||
ELM_COLORSELECTOR_DATA_GET(obj, sd);
|
||||
|
||||
if ((sd->r == r) && (sd->g == g) && (sd->b == b) && (sd->a == a))
|
||||
return;
|
||||
|
||||
sd->r = r;
|
||||
sd->g = g;
|
||||
sd->b = b;
|
||||
|
@ -417,6 +420,7 @@ _colors_set(Evas_Object *obj,
|
|||
(sd->cb_data[3]->colorbar, "elm.arrow", x, y);
|
||||
|
||||
_rectangles_redraw(sd->cb_data[3], x);
|
||||
evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -442,20 +446,16 @@ _entry_changed_cb(void *data,
|
|||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
if (v != sd->r)
|
||||
_colors_set(parent, v, sd->g, sd->b, sd->a);
|
||||
_colors_set(parent, v, sd->g, sd->b, sd->a);
|
||||
break;
|
||||
case 1:
|
||||
if (v != sd->g)
|
||||
_colors_set(parent, sd->r, v, sd->b, sd->a);
|
||||
_colors_set(parent, sd->r, v, sd->b, sd->a);
|
||||
break;
|
||||
case 2:
|
||||
if (v != sd->b)
|
||||
_colors_set(parent, sd->r, sd->g, v, sd->a);
|
||||
_colors_set(parent, sd->r, sd->g, v, sd->a);
|
||||
break;
|
||||
case 3:
|
||||
if (v != sd->a)
|
||||
_colors_set(parent, sd->r, sd->g, sd->b, v);
|
||||
_colors_set(parent, sd->r, sd->g, sd->b, v);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue