Set icon in a circle button

Set icon in a circle button

BY 06 Feb 2017 Native Application Development

Hello to all,

   I a trying to make a cercle button with a png icon image, well, I was cheching the forum and I didnt fount too much, and the few code that I found was not working, I can make a circle button but never shows the image, any one did before? Thanks, this is my code:

Evas_Object *ic;
    char bt_info_img[PATH_MAX];
    ic = elm_image_add(ad->btn_info);
    app_get_resource(“info.png”, bt_info_img, (int)PATH_MAX);
    elm_image_file_set(ic, bt_info_img, NULL);
    elm_image_resizable_set(ic, EINA_TRUE, EINA_TRUE);
    elm_object_part_content_set(ad->btn_info, “icon”, ic);
    evas_object_size_hint_min_set(ad->btn_info, ELM_SCALE_SIZE(150), ELM_SCALE_SIZE(58));
       // evas_object_smart_callback_add(btn, “clicked”, btn_clicked_cb, (void *)4);

    ad->btn_info = elm_button_add(table);

    evas_object_smart_callback_add(ad->btn_info, “clicked”, btn_info_clicked_cb, ad);

    elm_table_pack(table, ad->btn_info,0,0,2,1);
    evas_object_show(ad->btn_info);
    evas_object_show(ic);
    //evas_object_color_set(ad->btn_info, 0, 0, 0, 128);
    elm_object_style_set(ad->btn_info,”circle”);

Written by