tizen_vector: Fix ELM_VG_SCALE_SIZE function to handle scale properly. sandbox/jaehwan/devel
authorYoungbok Shin <youngb.shin@samsung.com>
Wed, 8 Jul 2015 08:06:34 +0000 (17:06 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Tue, 17 Nov 2015 05:15:45 +0000 (14:15 +0900)
All of elementary widgets shouldn't be affected by elm_app_base_scale_get().
@tizen_fix

Change-Id: I0e0dc007e64fb873f5433bc1fad04e1b24cec564

src/lib/tizen_vector.c

index 69a5557..f2fda2c 100644 (file)
 
 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 */