From 8cea7059158fe706a09b3ad827a9e7c92d155a18 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Tue, 12 May 2015 23:31:17 +0900 Subject: [PATCH] tizen_vector: create the vg objects in advance. if the vg0 object is resized before the vg1, vg2, the vg shapes initialization won't be properly done. the resizing can be called when the vg object is swallowed. Change-Id: I0c59a52ed3022ae11c4f83baa0095a87aa66fdec --- src/lib/tizen_vector.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/lib/tizen_vector.c b/src/lib/tizen_vector.c index 07fbdbb..8df7afe 100644 --- a/src/lib/tizen_vector.c +++ b/src/lib/tizen_vector.c @@ -185,14 +185,14 @@ tizen_vg_radio_set(Elm_Radio *obj) radio_del_cb, vd); evas_object_event_callback_add(vd->vg[0], EVAS_CALLBACK_RESIZE, radio_base_resize_cb, vd); - elm_object_part_content_set(obj, "tizen_vg_shape", vd->vg[0]); - //Center Circle vd->vg[1] = evas_object_vg_add(e); - elm_object_part_content_set(obj, "tizen_vg_shape2", vd->vg[1]); //Iconic Circle vd->vg[2] = evas_object_vg_add(e); + + elm_object_part_content_set(obj, "tizen_vg_shape", vd->vg[0]); + elm_object_part_content_set(obj, "tizen_vg_shape2", vd->vg[1]); elm_object_part_content_set(obj, "tizen_vg_shape3", vd->vg[2]); vd->obj = obj; @@ -367,12 +367,12 @@ tizen_vg_check_favorite_set(Elm_Check *obj) check_favorite_del_cb, vd); evas_object_event_callback_add(vd->vg[0], EVAS_CALLBACK_RESIZE, check_favorite_vg_resize_cb, vd); - elm_object_part_content_set(obj, "tizen_vg_shape", vd->vg[0]); - //Inner Body Star vd->vg[1] = evas_object_vg_add(evas_object_evas_get(obj)); evas_object_event_callback_add(vd->vg[1], EVAS_CALLBACK_RESIZE, check_favorite_vg2_resize_cb, vd); + + elm_object_part_content_set(obj, "tizen_vg_shape", vd->vg[0]); elm_object_part_content_set(obj, "tizen_vg_shape2", vd->vg[1]); vd->obj = obj; @@ -690,18 +690,17 @@ tizen_vg_check_onoff_set(Elm_Check *obj) check_onoff_del_cb, vd); evas_object_event_callback_add(vd->vg[0], EVAS_CALLBACK_RESIZE, check_onoff_vg_resize_cb, vd); - elm_object_part_content_set(obj, "tizen_vg_shape", vd->vg[0]); - //Overlapped Circle VG vd->vg[1] = evas_object_vg_add(evas_object_evas_get(obj)); evas_object_event_callback_add(vd->vg[1], EVAS_CALLBACK_RESIZE, check_onoff_vg2_resize_cb, vd); - elm_object_part_content_set(obj, "tizen_vg_shape2", vd->vg[1]); - //Line-Circle VG vd->vg[2] = evas_object_vg_add(evas_object_evas_get(obj)); evas_object_event_callback_add(vd->vg[2], EVAS_CALLBACK_RESIZE, check_onoff_vg3_resize_cb, vd); + + elm_object_part_content_set(obj, "tizen_vg_shape", vd->vg[0]); + elm_object_part_content_set(obj, "tizen_vg_shape2", vd->vg[1]); elm_object_part_content_set(obj, "tizen_vg_shape3", vd->vg[2]); vd->obj = obj; @@ -1139,12 +1138,12 @@ tizen_vg_button_set(Elm_Button *obj) button_del_cb, vd); evas_object_event_callback_add(vd->vg[0], EVAS_CALLBACK_RESIZE, button_base_resize_cb, vd); - elm_object_part_content_set(obj, "tizen_vg_shape", vd->vg[0]); - //Effect VG vd->vg[1] = evas_object_vg_add(e); evas_object_event_callback_add(vd->vg[1], EVAS_CALLBACK_RESIZE, button_effect_resize_cb, vd); + + elm_object_part_content_set(obj, "tizen_vg_shape", vd->vg[0]); elm_object_part_content_set(obj, "tizen_vg_shape2", vd->vg[1]); vd->obj = obj; -- 2.7.4