elm_bg: added a color reset feature.

This can be achieved by calling elm_bg_color_set(bg, -1, -1, -1);
This commit is contained in:
Daniel Juyung Seo 2013-08-28 19:31:40 +09:00
parent beddd2c007
commit ec474f513d
4 changed files with 14 additions and 0 deletions

View File

@ -1577,3 +1577,7 @@
2013-08-26 Daniel Juyung Seo (SeoZ)
* Gengrid: implement selectraise feature.
2013-08-28 DAniel Juyung Seo (SeoZ)
* Bg: Add bg reset feature.

View File

@ -84,6 +84,7 @@ Additions:
* Add _elm_access_object_get, deprecate _elm_access_info_get
* Add elm_win_focus_highlight_animate_set/get().
* Add selectraise feature to gengrid.
* Add bg reset feature.
Improvements:

View File

@ -308,6 +308,13 @@ _color_set(Eo *obj, void *_pd, va_list *list)
Elm_Bg_Smart_Data *sd = _pd;
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
// reset color
if ((r == -1) && (g == -1) && (b == -1))
{
ELM_SAFE_FREE(sd->rect, evas_object_del);
return;
}
if (!sd->rect)
{
sd->rect = evas_object_rectangle_add

View File

@ -98,6 +98,8 @@ EAPI Elm_Bg_Option elm_bg_option_get(const Evas_Object *obj);
* previously called elm_bg_file_set(), so that you just want a solid
* color background.
*
* @note You can reset the color by setting @r, @g, @b as -1, -1, -1.
*
* @see elm_bg_color_get()
*
* @ingroup Bg