[Button] apply corner radius based on effect_spacer
authorSung-Taek Hong <sth253.hong@samsung.com>
Thu, 27 Aug 2015 13:55:09 +0000 (22:55 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Tue, 17 Nov 2015 05:15:43 +0000 (14:15 +0900)
Change-Id: I0bc8010fbee1eb2788671f39ab19bddfe727c803
Signed-off-by: Sung-Taek Hong <sth253.hong@samsung.com>
src/lib/tizen_vector.c

index 8b41c56fa3124e8f6882252c5604868657512af3..c3519011056ba49d8bcf019aa0e7c25eecb1f9c1 100644 (file)
@@ -1206,7 +1206,8 @@ button_effect_no_bg_resize_cb(void *data, Evas *e EINA_UNUSED,
         Evas_Coord w2, h2;
         double effect_ratio;
 
-        evas_object_geometry_get(vd->obj, NULL, NULL, &w2, &h2);
+        if (!edje_object_part_geometry_get(elm_layout_edje_get(vd->obj), "effect_spacer", NULL, NULL, &w2, &h2))
+          evas_object_geometry_get(vd->obj, NULL, NULL, &w2, &h2);
         effect_ratio = (w2 < h2) ? (double)w / w2 : (double)h / h2;
         evas_vg_shape_shape_append_rect(vd->shape[0], 0, 0, w, h, vd->corner * effect_ratio, vd->corner * effect_ratio);
      }
@@ -1309,7 +1310,8 @@ button_effect_resize_cb(void *data, Evas *e EINA_UNUSED,
         Evas_Coord w2, h2;
         double effect_ratio;
 
-        evas_object_geometry_get(vd->vg[0], NULL, NULL, &w2, &h2);
+        if (!edje_object_part_geometry_get(elm_layout_edje_get(vd->obj), "effect_spacer", NULL, NULL, &w2, &h2))
+          evas_object_geometry_get(vd->vg[0], NULL, NULL, &w2, &h2);
         effect_ratio = (w2 < h2) ? (double)w / w2 : (double)h / h2;
         evas_vg_shape_shape_append_rect(vd->shape[1], 0, 0, w, h, vd->corner * effect_ratio, vd->corner * effect_ratio);
      }