summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2013-11-25 20:48:22 +0900
committerChunEon Park <hermet@hermet.pe.kr>2013-11-25 20:48:22 +0900
commit589247c7508d30b48c8da46ae783f4c90f0b069b (patch)
tree75a490e121ad8569eea7ba0232567e5928884043 /src
parenta4dabe45329ce186ef49f9768abb154dad1ab356 (diff)
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?)
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_image.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index e304e4b47..e5657bf33 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -478,12 +478,9 @@ _elm_image_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
478 priv->resize_up = EINA_TRUE; 478 priv->resize_up = EINA_TRUE;
479 priv->resize_down = EINA_TRUE; 479 priv->resize_down = EINA_TRUE;
480 priv->aspect_fixed = EINA_TRUE; 480 priv->aspect_fixed = EINA_TRUE;
481 481 priv->load_size = 0;
482 priv->load_size = 64;
483 priv->scale = 1.0; 482 priv->scale = 1.0;
484 483
485 eo_do(obj, elm_obj_image_load_size_set(0));
486
487 elm_widget_can_focus_set(obj, EINA_FALSE); 484 elm_widget_can_focus_set(obj, EINA_FALSE);
488 485
489 eo_do(obj, elm_obj_image_sizing_eval()); 486 eo_do(obj, elm_obj_image_sizing_eval());
@@ -725,6 +722,7 @@ static void
725_elm_image_file_set_do(Evas_Object *obj) 722_elm_image_file_set_do(Evas_Object *obj)
726{ 723{
727 Evas_Object *pclip = NULL; 724 Evas_Object *pclip = NULL;
725 int w, h;
728 726
729 ELM_IMAGE_DATA_GET(obj, sd); 727 ELM_IMAGE_DATA_GET(obj, sd);
730 728
@@ -743,8 +741,13 @@ _elm_image_file_set_do(Evas_Object *obj)
743 741
744 sd->edje = EINA_FALSE; 742 sd->edje = EINA_FALSE;
745 743
746 if (!sd->load_size) 744 if (sd->load_size > 0)
747 evas_object_image_load_size_set(sd->img, sd->load_size, sd->load_size); 745 evas_object_image_load_size_set(sd->img, sd->load_size, sd->load_size);
746 else
747 {
748 eo_do((Eo *) obj, elm_obj_image_size_get(&w, &h));
749 evas_object_image_load_size_set(sd->img, w, h);
750 }
748} 751}
749 752
750static void 753static void
@@ -1290,9 +1293,6 @@ _elm_image_smart_load_size_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1290 int size = va_arg(*list, int); 1293 int size = va_arg(*list, int);
1291 1294
1292 sd->load_size = size; 1295 sd->load_size = size;
1293 if (!sd->img || sd->edje) return;
1294
1295 evas_object_image_load_size_set(sd->img, sd->load_size, sd->load_size);
1296} 1296}
1297 1297
1298EAPI int 1298EAPI int