2012-12-17 Chueon Park (Hermet)
- * Makes naviframe safety even if someone deletes the naviframe in transition finished cb.
\ No newline at end of file
+ * Makes naviframe safety even if someone deletes the naviframe in transition finished cb.
+
+2012-12-18 Chueon Park (Hermet)
+
+ * Don't Elm_transit image animation use image preloading to avoid image flickering.
+
+2012-12-18 Chueon Park (Hermet)
+
+ * Let image update right now if the image preloading is disabled.
\ No newline at end of file
* Now, dummy object is always smart member of naviframe.
* Fix the popup that returned invalid action buttons.
* Fix the naviframe to not have crash even if user deletes the naviframe in the transition finished cb.
+ * Fix Don't elm_transit image animation use the image preloading to avoid image flickering.
+ * Fix the image to show the image right now if the image preloading is disabled.
Elementary 1.7.3
{
ELM_IMAGE_DATA_GET(obj, sd);
- if (sd->edje) return;
+ if (sd->edje || !sd->preloading) return;
evas_object_image_preload(sd->img, disable);
sd->preloading = !disable;
+
+ if (disable)
+ {
+ if (sd->show && sd->img) evas_object_show(sd->img);
+ if (sd->prev_img)
+ {
+ evas_object_del(sd->prev_img);
+ sd->prev_img = NULL;
+ }
+ }
}
static void
struct _Elm_Transit_Effect_Image_Animation
{
Eina_List *images;
+ unsigned int prev_idx;
};
static void
EINA_SAFETY_ON_NULL_RETURN(transit);
Eina_List *elist;
Evas_Object *obj;
- const char *type;
+ const char *type, *type_deprecated;
Elm_Transit_Effect_Image_Animation *image_animation = effect;
- unsigned int count = 0;
+ unsigned int idx = 0;
int len;
- type = eina_stringshare_add("elm_icon");
+ type = eina_stringshare_add("elm_image");
+ //FIXME: Remove later when elm_icon is cleared.
+ type_deprecated = eina_stringshare_add("elm_icon");
+
len = eina_list_count(image_animation->images);
if (len)
{
- count = floor(progress * len);
- EINA_LIST_FOREACH(transit->objs, elist, obj)
+ idx = floor(progress * len);
+ if (image_animation->prev_idx != idx)
{
- if (elm_widget_type_check(obj, type, __func__))
- elm_image_file_set(obj,
- eina_list_nth(image_animation->images, count),
- NULL);
+ EINA_LIST_FOREACH(transit->objs, elist, obj)
+ {
+ if (elm_widget_type_check(obj, type, __func__) ||
+ elm_widget_type_check(obj, type_deprecated, __func__))
+ {
+ const char *file = eina_list_nth(image_animation->images,
+ idx);
+
+ elm_image_file_set(obj, file, NULL);
+ elm_image_preload_disabled_set(obj, EINA_TRUE);
+ }
+ }
}
+ image_animation->prev_idx = idx;
}
eina_stringshare_del(type);
+ eina_stringshare_del(type_deprecated);
}
static Elm_Transit_Effect *
if (!image_animation) return NULL;
image_animation->images = images;
+ image_animation->prev_idx = -1;
return image_animation;
}