Enlightenment CVS committal Author : handyande Project : misc Module : engage
Dir : misc/engage/src Modified Files: icon.c Log Message: Fix icon grabbing :) =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -3 -r1.40 -r1.41 --- icon.c 13 Oct 2004 13:45:56 -0000 1.40 +++ icon.c 13 Oct 2004 13:52:15 -0000 1.41 @@ -79,6 +79,24 @@ return ret; } +void +od_object_resize_intercept_cb(void *data, Evas_Object * o, + Evas_Coord w, Evas_Coord h) +{ + if (o) { + if (!strcmp("image", evas_object_type_get(o))) { + evas_object_image_fill_set(o, 0.0, 0.0, w, h); + } else { +#if 0 + fprintf(stderr, "Intercepting something other than an image(%s)\n", + evas_object_type_get(o)); +#endif + } + } + evas_object_resize(o, w, h); +} + + #ifdef HAVE_IMLIB void od_icon_grab(OD_Icon * icon, Ecore_X_Window win) @@ -121,6 +139,12 @@ edje_object_part_unswallow(icon->icon, icon->pic); evas_object_del(icon->pic); icon->pic = evas_object_image_add(evas); + evas_object_image_alpha_set(icon->pic, 1); + evas_object_image_smooth_scale_set(icon->pic, 1); + evas_object_pass_events_set(icon->pic, 1); + evas_object_intercept_resize_callback_add(icon->pic, + od_object_resize_intercept_cb, + NULL); } evas_object_image_size_set(icon->pic, w, h); @@ -136,23 +160,6 @@ #endif void -od_object_resize_intercept_cb(void *data, Evas_Object * o, - Evas_Coord w, Evas_Coord h) -{ - if (o) { - if (!strcmp("image", evas_object_type_get(o))) { - evas_object_image_fill_set(o, 0.0, 0.0, w, h); - } else { -#if 0 - fprintf(stderr, "Intercepting something other than an image(%s)\n", - evas_object_type_get(o)); -#endif - } - } - evas_object_resize(o, w, h); -} - -void od_icon_reload(OD_Icon * in) { const char *icon_part = NULL; ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs