summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-08-10 16:43:30 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-08-10 16:43:55 +0900
commitd5c80d61e7e4426970fe4d4007c4176bcd187815 (patch)
tree17cb3b86ac426e7b0bd8e56a9e906df359fdf5dc
parentc7acb8c01c2895d260babf5996164d32c21849f7 (diff)
Efl.Ui.Image: use internal func to detect legacy usage
-rw-r--r--src/lib/elementary/efl_ui_image.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 9de08067c4..8f971fb568 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -226,7 +226,7 @@ _efl_ui_image_internal_sizing_eval(Evas_Object *obj, Efl_Ui_Image_Data *sd)
226 } 226 }
227 227
228 //3. Calculate offset according to align value 228 //3. Calculate offset according to align value
229 if (!sd->legacy_align) 229 if (!elm_widget_is_legacy(obj))
230 { 230 {
231 offset_x = ((sd->img_w - w) * sd->align_x); 231 offset_x = ((sd->img_w - w) * sd->align_x);
232 offset_y = ((sd->img_h - h) * sd->align_y); 232 offset_y = ((sd->img_h - h) * sd->align_y);
@@ -578,7 +578,7 @@ _efl_ui_image_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Image_Data *priv)
578EOLIAN static void 578EOLIAN static void
579_efl_ui_image_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Data *sd) 579_efl_ui_image_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Data *sd)
580{ 580{
581 if (sd->legacy_align) 581 if (elm_widget_is_legacy(obj))
582 efl_event_callback_del(obj, EFL_GFX_EVENT_CHANGE_SIZE_HINTS, 582 efl_event_callback_del(obj, EFL_GFX_EVENT_CHANGE_SIZE_HINTS,
583 _on_size_hints_changed, sd); 583 _on_size_hints_changed, sd);
584 ecore_timer_del(sd->anim_timer); 584 ecore_timer_del(sd->anim_timer);
@@ -855,7 +855,6 @@ elm_image_add(Evas_Object *parent)
855 Evas_Object *obj = efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 855 Evas_Object *obj = efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added));
856 EFL_UI_IMAGE_DATA_GET(obj, priv); 856 EFL_UI_IMAGE_DATA_GET(obj, priv);
857 857
858 priv->legacy_align = EINA_TRUE;
859 efl_event_callback_add(obj, EFL_GFX_EVENT_CHANGE_SIZE_HINTS, _on_size_hints_changed, priv); 858 efl_event_callback_add(obj, EFL_GFX_EVENT_CHANGE_SIZE_HINTS, _on_size_hints_changed, priv);
860 859
861 return obj; 860 return obj;
@@ -1566,7 +1565,6 @@ _efl_ui_image_scalable_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, Eina_Bool
1566EOLIAN static void 1565EOLIAN static void
1567_efl_ui_image_align_set(Eo *obj, Efl_Ui_Image_Data *sd, double align_x, double align_y) 1566_efl_ui_image_align_set(Eo *obj, Efl_Ui_Image_Data *sd, double align_x, double align_y)
1568{ 1567{
1569 sd->legacy_align = EINA_FALSE;
1570 if (align_x > 1.0) 1568 if (align_x > 1.0)
1571 align_x = 1.0; 1569 align_x = 1.0;
1572 else if (align_x < 0.0) 1570 else if (align_x < 0.0)