From: Jisung Ahn Date: Mon, 4 Mar 2013 07:54:15 +0000 (+0900) Subject: fix scissor box parent X-Git-Tag: 2.1b_release~3^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9dd3a93d371a5eb9a81aa6a73e746016489cdbbb;p=apps%2Fcore%2Fpreloaded%2Fug-image-viewer-efl.git fix scissor box parent Change-Id: I12187c6e81c92d82d59a03b97e7f91b6daeee514 --- diff --git a/main/src/view/ivug-crop-view.cpp b/main/src/view/ivug-crop-view.cpp index 979e500..04d7039 100755 --- a/main/src/view/ivug-crop-view.cpp +++ b/main/src/view/ivug-crop-view.cpp @@ -490,7 +490,16 @@ IvugCropView *ivug_crop_view_create(Evas_Object *parent) pCropView->bShowMenu = true; //_add_gesture_layer(layout, pCropView); - pCropView->cropbox = ivug_scissorbox_add(layout); + pCropView->contents_area = ivug_default_layout_add(parent); + evas_object_name_set(pCropView->contents_area, "contets_area"); + if ( pCropView->contents_area == NULL ) + { + MSG_SETAS_ERROR("Cannot create contets_area."); + } + + elm_object_part_content_set(pCropView->layout, "crop.contents.swallow", pCropView->contents_area); + + pCropView->cropbox = ivug_scissorbox_add(pCropView->contents_area); ivug_scissorbox_type_set(pCropView->cropbox, SCISSOR_BOX_TYPE_2); elm_object_part_content_set(layout, "scissorbox", pCropView->cropbox); @@ -506,16 +515,6 @@ IvugCropView *ivug_crop_view_create(Evas_Object *parent) pCropView->w = 0; pCropView->h = 0; - - pCropView->contents_area = ivug_default_layout_add(parent); - evas_object_name_set(pCropView->contents_area, "contets_area"); - if ( pCropView->contents_area == NULL ) - { - MSG_SETAS_ERROR("Cannot create contets_area."); - } - - elm_object_part_content_set(pCropView->layout, "crop.contents.swallow", pCropView->contents_area); - return pCropView; } diff --git a/main/src/view/ivug-setas-view-callerid.cpp b/main/src/view/ivug-setas-view-callerid.cpp index 1dba7bc..6daca35 100755 --- a/main/src/view/ivug-setas-view-callerid.cpp +++ b/main/src/view/ivug-setas-view-callerid.cpp @@ -430,7 +430,17 @@ Evas_Object *_ivug_setas_callerid_create_layout(Evas_Object *parent) goto error; } - pSetAsData->crop.box = ivug_scissorbox_add(pSetAsData->layout); + MSG_SETAS_HIGH("Create setas layout"); + pSetAsData->contents_area = ivug_default_layout_add(parent); + evas_object_name_set(pSetAsData->contents_area, "contets_area"); + if ( pSetAsData->contents_area == NULL ) + { + MSG_SETAS_ERROR("Cannot create contets_area."); + } + + elm_object_part_content_set(pSetAsData->layout, "setasview.contents.swallow", pSetAsData->contents_area); + + pSetAsData->crop.box = ivug_scissorbox_add(pSetAsData->contents_area); if ( pSetAsData->crop.box == NULL ) { @@ -455,16 +465,6 @@ Evas_Object *_ivug_setas_callerid_create_layout(Evas_Object *parent) pSetAsData->bShowMenu = true; //_add_gesture_layer(pSetAsData->layout, pSetAsData); - MSG_SETAS_HIGH("Create setas layout"); - pSetAsData->contents_area = ivug_default_layout_add(parent); - evas_object_name_set(pSetAsData->contents_area, "contets_area"); - if ( pSetAsData->contents_area == NULL ) - { - MSG_SETAS_ERROR("Cannot create contets_area."); - } - - elm_object_part_content_set(pSetAsData->layout, "setasview.contents.swallow", pSetAsData->contents_area); - evas_object_data_set(pSetAsData->layout, "pSetAsData", pSetAsData); evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout); evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);