forked from enlightenment/efl
image - fix the elm_image_prescale_set() to work properly.
before this, it had the insane logic so the prescale_set() never work. Now, it works well and the prescale won't be set in default. (before, the default value is 64. why?)
This commit is contained in:
parent
5936c6cfbb
commit
45ed80a0c8
|
@ -1752,3 +1752,7 @@
|
||||||
|
|
||||||
* mapbuf: reset the mapbuf internals correctly when the content is
|
* mapbuf: reset the mapbuf internals correctly when the content is
|
||||||
removed(unset)
|
removed(unset)
|
||||||
|
|
||||||
|
2013-11-25 ChunEon Park (Hermet)
|
||||||
|
|
||||||
|
* image: fix the elm_image_prescale_set() to work properly.
|
||||||
|
|
|
@ -310,6 +310,7 @@ Fixes:
|
||||||
* scroller : fix the scroller to locate the current page correctly in case that the scroller is suddenly resized and then the drag couldn't capture the page location.
|
* scroller : fix the scroller to locate the current page correctly in case that the scroller is suddenly resized and then the drag couldn't capture the page location.
|
||||||
* scroller: don't focus region show if the scroller is disabled.
|
* scroller: don't focus region show if the scroller is disabled.
|
||||||
* mapbuf: reset the mapbuf internal states correclty when the content is removed(unset)
|
* mapbuf: reset the mapbuf internal states correclty when the content is removed(unset)
|
||||||
|
* image: fix the elm_image_prescale_set() to work properly.
|
||||||
|
|
||||||
Removals:
|
Removals:
|
||||||
|
|
||||||
|
|
|
@ -478,12 +478,9 @@ _elm_image_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
priv->resize_up = EINA_TRUE;
|
priv->resize_up = EINA_TRUE;
|
||||||
priv->resize_down = EINA_TRUE;
|
priv->resize_down = EINA_TRUE;
|
||||||
priv->aspect_fixed = EINA_TRUE;
|
priv->aspect_fixed = EINA_TRUE;
|
||||||
|
priv->load_size = 0;
|
||||||
priv->load_size = 64;
|
|
||||||
priv->scale = 1.0;
|
priv->scale = 1.0;
|
||||||
|
|
||||||
eo_do(obj, elm_obj_image_load_size_set(0));
|
|
||||||
|
|
||||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||||
|
|
||||||
eo_do(obj, elm_obj_image_sizing_eval());
|
eo_do(obj, elm_obj_image_sizing_eval());
|
||||||
|
@ -725,6 +722,7 @@ static void
|
||||||
_elm_image_file_set_do(Evas_Object *obj)
|
_elm_image_file_set_do(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Evas_Object *pclip = NULL;
|
Evas_Object *pclip = NULL;
|
||||||
|
int w, h;
|
||||||
|
|
||||||
ELM_IMAGE_DATA_GET(obj, sd);
|
ELM_IMAGE_DATA_GET(obj, sd);
|
||||||
|
|
||||||
|
@ -743,8 +741,13 @@ _elm_image_file_set_do(Evas_Object *obj)
|
||||||
|
|
||||||
sd->edje = EINA_FALSE;
|
sd->edje = EINA_FALSE;
|
||||||
|
|
||||||
if (!sd->load_size)
|
if (sd->load_size > 0)
|
||||||
evas_object_image_load_size_set(sd->img, sd->load_size, sd->load_size);
|
evas_object_image_load_size_set(sd->img, sd->load_size, sd->load_size);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
eo_do((Eo *) obj, elm_obj_image_size_get(&w, &h));
|
||||||
|
evas_object_image_load_size_set(sd->img, w, h);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1290,9 +1293,6 @@ _elm_image_smart_load_size_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
int size = va_arg(*list, int);
|
int size = va_arg(*list, int);
|
||||||
|
|
||||||
sd->load_size = size;
|
sd->load_size = size;
|
||||||
if (!sd->img || sd->edje) return;
|
|
||||||
|
|
||||||
evas_object_image_load_size_set(sd->img, sd->load_size, sd->load_size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
|
|
Loading…
Reference in New Issue