From 11a16967a1f86ae317f84bb4a62bcafe3cabf6cf Mon Sep 17 00:00:00 2001 From: chitta ranjan Date: Tue, 7 May 2013 21:26:33 +0900 Subject: [PATCH] Nabi issue fix Change-Id: I1471954d7315b21cdfc885ed4c11dee5f45e4951 Signed-off-by: chitta ranjan --- inc/IvTypes.h | 1 - src/IvImageCropForm.cpp | 19 +++++++------------ src/IvImageViewerForm.cpp | 13 ------------- src/IvTypes.cpp | 1 - 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/inc/IvTypes.h b/inc/IvTypes.h index 5bea673..c961b0c 100644 --- a/inc/IvTypes.h +++ b/inc/IvTypes.h @@ -210,7 +210,6 @@ extern const wchar_t* DEVICE_STORAGE_CARD_UNMOUNTED; extern const wchar_t* MEDIA_ROOT_PHONE; -extern const int H_FOOTER_PANEL; extern const int H_INDICATOR_BAR; extern const int H_CROP_RECTANGLE; extern const int CROP_BOX_OFFSET; diff --git a/src/IvImageCropForm.cpp b/src/IvImageCropForm.cpp index 3f8549d..72e2e0b 100644 --- a/src/IvImageCropForm.cpp +++ b/src/IvImageCropForm.cpp @@ -128,6 +128,7 @@ ImageCropForm::OnInitializing(void) pCancelButton->SetActionId(IDA_BUTTON_CANCEL); delete pCancelButtonBitmap; } + SetControlAlwaysOnTop(*pPanel, true); Label* pLabel = static_cast(pPanel->GetControl(L"IDC_PANEL_LABEL")); if (pLabel != null) @@ -413,14 +414,6 @@ ImageCropForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) } delete pAddressbook; } - delete pCropBuffer; - - ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); - pList->Add(new (std::nothrow) String(destFilePath)); - pSceneManager->GoBackward(BackwardSceneTransition(), pList); - - AppLogDebug("EXIT(%s)1", GetErrorMessage(GetLastResult())); - return; } delete pCropBuffer; pSceneManager->GoBackward(BackwardSceneTransition()); @@ -934,6 +927,8 @@ ImageCropForm::SetValue(void) int prevWidth = __imageBox.width; int prevImageboxX = __imageBox.x; int prevImageBoxY = __imageBox.y; + Panel* pPanel = null; + pPanel = static_cast(GetControl(L"IDC_FOOTER_PANEL")); if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT) { @@ -946,9 +941,9 @@ ImageCropForm::SetValue(void) __formWidth = Form::GetBounds().height; } - float clientAreaRatio = (GetClientAreaBoundsF().height - H_FOOTER_PANEL) / GetClientAreaBoundsF().width; + float clientAreaRatio = (GetClientAreaBoundsF().height - pPanel->GetBounds().height) / GetClientAreaBoundsF().width; - if (__imageWidth >= GetClientAreaBounds().width || __imageHeight > (GetClientAreaBounds().height - H_FOOTER_PANEL)) + if (__imageWidth >= GetClientAreaBounds().width || __imageHeight > (GetClientAreaBounds().height - pPanel->GetBounds().height)) { float imageRatio = __imageHeight / (float) __imageWidth; if (imageRatio < clientAreaRatio) @@ -956,11 +951,11 @@ ImageCropForm::SetValue(void) __imageBox.width = GetClientAreaBounds().width; __imageBox.height = (__imageHeight * __imageBox.width) / __imageWidth; __imageBox.x = GetClientAreaBounds().x; - __imageBox.y = GetClientAreaBounds().y + ((GetClientAreaBounds().height - H_FOOTER_PANEL) - __imageBox.height) / 2; + __imageBox.y = GetClientAreaBounds().y + ((GetClientAreaBounds().height - pPanel->GetBounds().height) - __imageBox.height) / 2; } else { - __imageBox.height = GetClientAreaBounds().height - H_FOOTER_PANEL; + __imageBox.height = GetClientAreaBounds().height - pPanel->GetBounds().height; __imageBox.width = (__imageWidth * __imageBox.height) / __imageHeight; __imageBox.x = (GetClientAreaBounds().width - __imageBox.width) / 2; __imageBox.y = GetClientAreaBounds().y; diff --git a/src/IvImageViewerForm.cpp b/src/IvImageViewerForm.cpp index 8848365..057e8ae 100644 --- a/src/IvImageViewerForm.cpp +++ b/src/IvImageViewerForm.cpp @@ -1787,19 +1787,6 @@ ImageViewerForm::OnSceneActivatedN(const SceneId& previousSceneId, Invalidate(true); } - if (previousSceneId == IDSCN_IMAGE_CROP && pArgs != null) - { - String filePath; - filePath = *(static_cast(pArgs->GetAt(0))); - delete pArgs; - int count = __pPresentationModel->GetFileCount(); - __pPresentationModel->AddImageCache(filePath); - __pGallery->UpdateGallery(); - __pGallery->SetCurrentItemIndex(count); - __pPresentationModel->RequestImage(filePath); - ShowPanelDetail(false); - } - if (__pGallery->GetCurrentItemIndex() < 0) { SetFooterItemState(false); diff --git a/src/IvTypes.cpp b/src/IvTypes.cpp index 1962dd0..2748789 100644 --- a/src/IvTypes.cpp +++ b/src/IvTypes.cpp @@ -152,7 +152,6 @@ const wchar_t* DEVICE_STORAGE_CARD_UNMOUNTED = L"Unmounted"; const wchar_t* MEDIA_ROOT_PHONE = L"Phone/"; -const int H_FOOTER_PANEL = 98; const int H_INDICATOR_BAR = 60; const int H_CROP_RECTANGLE = 20; const int CROP_BOX_OFFSET = 20; -- 2.7.4