How to create a transparent button

How to create a transparent button

BY 04 Nov 2017 Native Application Development

Hi all,

I want to create a button with image, that is transparent. 

This is how the button is defined:

void set_object_image(Evas_Object *object, char *res_path, char *filename){
    Evas_Object *img;
	img = elm_image_add(object);
	char buf[PATH_MAX];
	snprintf(ICON_DIR, PATH_MAX, "%s", res_path);
	snprintf(buf, sizeof(buf), "%s/%s", ICON_DIR, filename);
	dlog_print(DLOG_INFO, APP_TAG, buf);
	elm_image_file_set(img, buf, NULL);
	elm_object_part_content_set(object, "icon", img);
	elm_win_alpha_set(object, EINA_TRUE);
}

i already tried to add an alpha channel, but without success. (even if i think that this function has to be used with an object).

 

Written by