From: Youngbok Shin Date: Wed, 8 Jul 2015 08:06:34 +0000 (+0900) Subject: tizen_vector: Fix ELM_VG_SCALE_SIZE function to handle scale properly. X-Git-Tag: submit/tizen/20151118.115124~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fsandbox%2Fjaehwan%2Fdevel;p=platform%2Fupstream%2Felementary.git tizen_vector: Fix ELM_VG_SCALE_SIZE function to handle scale properly. All of elementary widgets shouldn't be affected by elm_app_base_scale_get(). @tizen_fix Change-Id: I0e0dc007e64fb873f5433bc1fad04e1b24cec564 --- diff --git a/src/lib/tizen_vector.c b/src/lib/tizen_vector.c index 69a555784..f2fda2c3e 100644 --- a/src/lib/tizen_vector.c +++ b/src/lib/tizen_vector.c @@ -12,23 +12,12 @@ static const char *vg_key = "_tizen_vg"; - -/* - This api is required for tizen2.3 compatibility. - As elm_app_base_scale_set() in introduced in tizen 2.4 and - used in the calculation of scaling. For appliaction's thats - written on tizen2.3 the default value is 1 , but we need 1.7 - for qHD display hence the hack. - From tizen2.4 onwards its the application responsibility to set - the base scale properly. -*/ static double ELM_VG_SCALE_SIZE(Evas_Object* obj, double x) { - if (elm_app_base_scale_get() > 1) - return (ELM_SCALE_SIZE(x) * elm_object_scale_get(obj)); - else - return (((x) / 1.7) * elm_config_scale_get() * elm_object_scale_get(obj)); + Evas_Object *edje = elm_layout_edje_get(obj); + + return ((x) * elm_config_scale_get() / edje_object_base_scale_get(edje) * elm_widget_scale_get(obj)); } ///////////////////////////////////////////////////////////////////////// /* Radio */