From 59f76ca5e8256fa3b0b23c079a7d738e2c173694 Mon Sep 17 00:00:00 2001 From: discomfitor Date: Fri, 6 Jan 2012 05:55:51 +0000 Subject: [PATCH] aspect_ratio_retained -> aspect_fixed git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66926 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- doc/examples.dox | 2 +- src/examples/image_example_01.c | 2 +- src/lib/elm_image.c | 8 ++++---- src/lib/elm_image.h | 12 ++++++------ src/lib/elm_photo.c | 4 ++-- src/lib/els_icon.c | 18 +++++++++--------- src/lib/els_icon.h | 4 ++-- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/examples.dox b/doc/examples.dox index bf4598c..37a73b6 100644 --- a/doc/examples.dox +++ b/doc/examples.dox @@ -3472,7 +3472,7 @@ * elm_image_orient_set() is used to flip the image around the (1, 0) (0, 1) * diagonal. * - * elm_image_aspect_ratio_retained_set() is used to keep the original aspect + * elm_image_aspect_fixed_set() is used to keep the original aspect * ratio of the image, even when the window is resized to another aspect ratio. * * elm_image_fill_outside_set() is used to ensure that the image will fill the diff --git a/src/examples/image_example_01.c b/src/examples/image_example_01.c index 26321bf..95f371a 100644 --- a/src/examples/image_example_01.c +++ b/src/examples/image_example_01.c @@ -39,7 +39,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) elm_image_scale_set(image, EINA_FALSE, EINA_TRUE); elm_image_smooth_set(image, EINA_FALSE); elm_image_orient_set(image, ELM_IMAGE_FLIP_HORIZONTAL); - elm_image_aspect_ratio_retained_set(image, EINA_TRUE); + elm_image_aspect_fixed_set(image, EINA_TRUE); elm_image_fill_outside_set(image, EINA_TRUE); elm_image_editable_set(image, EINA_TRUE); diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c index 333fd29..40e50fc 100644 --- a/src/lib/elm_image.c +++ b/src/lib/elm_image.c @@ -322,21 +322,21 @@ elm_image_object_get(const Evas_Object *obj) } EAPI void -elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained) +elm_image_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed) { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; - return _els_smart_icon_aspect_ratio_retained_set(wd->img, retained); + return _els_smart_icon_aspect_fixed_set(wd->img, fixed); } EAPI Eina_Bool -elm_image_aspect_ratio_retained_get(const Evas_Object *obj) +elm_image_aspect_fixed_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return EINA_FALSE; - return _els_smart_icon_aspect_ratio_retained_get(wd->img); + return _els_smart_icon_aspect_fixed_get(wd->img); } /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-3f0^-2{2(0W1st0 :*/ diff --git a/src/lib/elm_image.h b/src/lib/elm_image.h index d673621..bcc13eb 100644 --- a/src/lib/elm_image.h +++ b/src/lib/elm_image.h @@ -218,10 +218,10 @@ EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *sca * and the image will fill the entire object (@p fill_outside is @c EINA_TRUE). * * @note This option will have no effect if - * elm_image_aspect_ratio_retained_set() is set to @c EINA_FALSE. + * elm_image_aspect_fixed_set() is set to @c EINA_FALSE. * * @see elm_image_fill_outside_get() - * @see elm_image_aspect_ratio_retained_set() + * @see elm_image_aspect_fixed_set() * * @ingroup Image */ @@ -351,7 +351,7 @@ EAPI Evas_Object *elm_image_object_get(const Evas_Object *obj); * Set whether the original aspect ratio of the image should be kept on resize. * * @param obj The image object. - * @param retained @c EINA_TRUE if the image should retain the aspect, + * @param fixed @c EINA_TRUE if the image should retain the aspect, * @c EINA_FALSE otherwise. * * The original aspect ratio (width / height) of the image is usually @@ -359,12 +359,12 @@ EAPI Evas_Object *elm_image_object_get(const Evas_Object *obj); * this original aspect, and the way that the image is fit into the object's * area depends on the option set by elm_image_fill_outside_set(). * - * @see elm_image_aspect_ratio_retained_get() + * @see elm_image_aspect_fixed_get() * @see elm_image_fill_outside_set() * * @ingroup Image */ -EAPI void elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained); +EAPI void elm_image_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed); /** * Get if the object retains the original aspect ratio. @@ -375,7 +375,7 @@ EAPI void elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina * * @ingroup Image */ -EAPI Eina_Bool elm_image_aspect_ratio_retained_get(const Evas_Object *obj); +EAPI Eina_Bool elm_image_aspect_fixed_get(const Evas_Object *obj); /** * @} diff --git a/src/lib/elm_photo.c b/src/lib/elm_photo.c index a1e83bc..841b03a 100644 --- a/src/lib/elm_photo.c +++ b/src/lib/elm_photo.c @@ -614,7 +614,7 @@ elm_photo_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed) ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; - return _els_smart_icon_aspect_ratio_retained_set(wd->img, fixed); + return _els_smart_icon_aspect_fixed_set(wd->img, fixed); } EAPI Eina_Bool @@ -623,7 +623,7 @@ elm_photo_aspect_fixed_get(const Evas_Object *obj) ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return EINA_FALSE; - return _els_smart_icon_aspect_ratio_retained_get(wd->img); + return _els_smart_icon_aspect_fixed_get(wd->img); } diff --git a/src/lib/els_icon.c b/src/lib/els_icon.c index ade438e..2146361 100644 --- a/src/lib/els_icon.c +++ b/src/lib/els_icon.c @@ -24,7 +24,7 @@ struct _Smart_Data Eina_Bool show : 1; Eina_Bool edit : 1; Eina_Bool edje : 1; - Eina_Bool aspect_ratio_retained: 1; + Eina_Bool aspect_fixed: 1; Elm_Image_Orient orient; }; @@ -489,27 +489,27 @@ _els_smart_icon_edje_get(Evas_Object *obj) } void -_els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained) +_els_smart_icon_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed) { Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (!sd) return; - retained = !!retained; - if (sd->aspect_ratio_retained == retained) return; - sd->aspect_ratio_retained = retained; + fixed = !!fixed; + if (sd->aspect_fixed == fixed) return; + sd->aspect_fixed = fixed; _smart_reconfigure(sd); } Eina_Bool -_els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj) +_els_smart_icon_aspect_fixed_get(const Evas_Object *obj) { Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (!sd) return EINA_FALSE; - return sd->aspect_ratio_retained; + return sd->aspect_fixed; } /* local subsystem globals */ @@ -547,7 +547,7 @@ _smart_reconfigure(Smart_Data *sd) if (iw < 1) iw = 1; if (ih < 1) ih = 1; - if (sd->aspect_ratio_retained) + if (sd->aspect_fixed) { h = ((double)ih * w) / (double)iw; if (sd->fill_inside) @@ -635,7 +635,7 @@ _smart_add(Evas_Object *obj) sd->fill_inside = EINA_TRUE; sd->scale_up = EINA_TRUE; sd->scale_down = EINA_TRUE; - sd->aspect_ratio_retained = EINA_TRUE; + sd->aspect_fixed = EINA_TRUE; sd->size = 64; sd->scale = 1.0; evas_object_smart_member_add(sd->obj, obj); diff --git a/src/lib/els_icon.h b/src/lib/els_icon.h index 27baff1..787c5bf 100644 --- a/src/lib/els_icon.h +++ b/src/lib/els_icon.h @@ -22,6 +22,6 @@ Elm_Image_Orient _els_smart_icon_orient_get(const Evas_Object *obj); void _els_smart_icon_edit_set(Evas_Object *obj, Eina_Bool, Evas_Object *parent); Eina_Bool _els_smart_icon_edit_get(const Evas_Object *obj); Evas_Object *_els_smart_icon_edje_get(Evas_Object *obj); -void _els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained); -Eina_Bool _els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj); +void _els_smart_icon_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed); +Eina_Bool _els_smart_icon_aspect_fixed_get(const Evas_Object *obj); void _els_smart_icon_preload_set(Evas_Object *obj, Eina_Bool disable); -- 2.7.4