forked from enlightenment/efl
elementary/image - fix the image to show the image right away if the image preloading is disabled.
SVN revision: 81207
This commit is contained in:
parent
2402d4aad9
commit
8680aa4ec9
|
@ -830,3 +830,7 @@
|
||||||
2012-12-18 Chueon Park (Hermet)
|
2012-12-18 Chueon Park (Hermet)
|
||||||
|
|
||||||
* Don't Elm_transit image animation use image preloading to avoid image flickering.
|
* 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.
|
||||||
|
|
|
@ -97,6 +97,7 @@ Fixes:
|
||||||
* Fix the popup that returned invalid action buttons.
|
* 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 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 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.
|
||||||
|
|
||||||
Removals:
|
Removals:
|
||||||
|
|
||||||
|
|
|
@ -28,14 +28,14 @@ _on_image_preloaded(void *data,
|
||||||
void *event __UNUSED__)
|
void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
Elm_Image_Smart_Data *sd = data;
|
Elm_Image_Smart_Data *sd = data;
|
||||||
|
|
||||||
sd->preloading = EINA_FALSE;
|
sd->preloading = EINA_FALSE;
|
||||||
|
|
||||||
if (sd->show) evas_object_show(obj);
|
if (sd->show) evas_object_show(obj);
|
||||||
if (sd->prev_img) evas_object_del(sd->prev_img);
|
if (sd->prev_img)
|
||||||
|
{
|
||||||
|
evas_object_del(sd->prev_img);
|
||||||
sd->prev_img = NULL;
|
sd->prev_img = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_on_mouse_up(void *data,
|
_on_mouse_up(void *data,
|
||||||
|
@ -715,16 +715,18 @@ _elm_image_smart_show(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
Elm_Image_Smart_Data *sd = _pd;
|
Elm_Image_Smart_Data *sd = _pd;
|
||||||
|
|
||||||
sd->show = EINA_TRUE;
|
sd->show = EINA_TRUE;
|
||||||
if (sd->preloading)
|
if (sd->preloading) return;
|
||||||
return;
|
|
||||||
|
|
||||||
eo_do_super(obj, evas_obj_smart_show());
|
eo_do_super(obj, evas_obj_smart_show());
|
||||||
|
|
||||||
evas_object_show(sd->img);
|
evas_object_show(sd->img);
|
||||||
|
|
||||||
if (sd->prev_img) evas_object_del(sd->prev_img);
|
if (sd->prev_img)
|
||||||
|
{
|
||||||
|
evas_object_del(sd->prev_img);
|
||||||
sd->prev_img = NULL;
|
sd->prev_img = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_elm_image_smart_hide(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
_elm_image_smart_hide(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
|
@ -884,7 +886,6 @@ _elm_image_smart_memfile_set(Eo *obj, void *_pd, va_list *list)
|
||||||
(sd->img, (void *)img, size, (char *)format, (char *)key);
|
(sd->img, (void *)img, size, (char *)format, (char *)key);
|
||||||
|
|
||||||
sd->preloading = EINA_TRUE;
|
sd->preloading = EINA_TRUE;
|
||||||
evas_object_hide(sd->img);
|
|
||||||
evas_object_image_preload(sd->img, EINA_FALSE);
|
evas_object_image_preload(sd->img, EINA_FALSE);
|
||||||
if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE)
|
if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE)
|
||||||
{
|
{
|
||||||
|
@ -962,10 +963,20 @@ _elm_image_smart_preload_disabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *l
|
||||||
|
|
||||||
Eina_Bool disable = va_arg(*list, int);
|
Eina_Bool disable = va_arg(*list, int);
|
||||||
|
|
||||||
if (sd->edje) return;
|
if (sd->edje || !sd->preloading) return;
|
||||||
|
|
||||||
evas_object_image_preload(sd->img, disable);
|
evas_object_image_preload(sd->img, disable);
|
||||||
sd->preloading = !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
|
static void
|
||||||
|
|
Loading…
Reference in New Issue