From 575b34648a2ccb7ec9f87f7144248217e556a0c0 Mon Sep 17 00:00:00 2001 From: "sriram.k" Date: Wed, 10 Jul 2013 13:04:13 +0530 Subject: [PATCH] Changed the BottomBg Bitmap drawing position. Signed-off-by: sriram.k Change-Id: I8b1395ca5778e37fa3c73af81fa8509a0bbb1efa --- src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp | 5 ++++- src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp | 4 +++- src/ui/inc/FUiCtrl_MessageBoxPresenter.h | 1 + src/ui/inc/FUiCtrl_ProgressPopupPresenter.h | 1 + src/ui/inc/FUi_ResourceMessageBoxConfig.h | 1 + src/ui/resource/FUi_ResourceMessageBoxConfig.cpp | 1 + 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp index 1cc9494..90db10e 100644 --- a/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp +++ b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp @@ -67,6 +67,7 @@ _MessageBoxPresenter::_MessageBoxPresenter(void) , __buttonNum(0) , __prevPositionY(-1.0f) , __textObjHeight(0.0f) + , __bgImageMargin(0.0f) , __touchPressFlag(false) , __scrollStart(false) , __btnClickFlag(false) @@ -262,6 +263,8 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox) GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin); GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + GET_FIXED_VALUE_CONFIG(MESSAGEBOX::BG_IMAGE_MARGIN, orientation, __bgImageMargin); + __titleBgBounds= FloatRectangle(transLeftMargin, transTopMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth) - (2 * transLeftMargin), titleHeight); @@ -351,7 +354,7 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox) __pScrollPanel->AttachChild(*__pLabel); __pMessageBox->AttachChild(*__pScrollPanel); - __buttonBgBounds = FloatRectangle(transLeftMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth)- (transLeftMargin + transRightMargin), bottomHeight); + __buttonBgBounds = FloatRectangle(transLeftMargin + __bgImageMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth)- (transLeftMargin + transRightMargin) - (2 * __bgImageMargin), bottomHeight - __bgImageMargin); r = CreateButtons(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp b/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp index 6409bd5..77ba40b 100644 --- a/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp @@ -61,6 +61,7 @@ _ProgressPopupPresenter::_ProgressPopupPresenter(void) , __pAnimation(null) , __pAnimationFrameList(null) , __textObjectHeight(0.0f) + , __bgImageMargin(0.0f) , __currentIndex(0) , __buttonPressState(false) , __cancelButton(false) @@ -687,6 +688,7 @@ _ProgressPopupPresenter::GetButtonBounds(void) GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, orientation, btnHeight); GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_01, orientation, btnSideMargin1); GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, buttonBgHeight); + GET_FIXED_VALUE_CONFIG(MESSAGEBOX::BG_IMAGE_MARGIN, orientation, __bgImageMargin); if (!__pProgressPopup->HasButton()) { @@ -721,7 +723,7 @@ _ProgressPopupPresenter::GetButtonBounds(void) + textBottomMargin + GetBodyTextObjHeight(); - __buttonBgBounds.SetBounds(transLeftMargin, y , (defaultWidth - (transLeftMargin + transRightMargin)) , buttonBgHeight); + __buttonBgBounds.SetBounds(transLeftMargin + __bgImageMargin, y , (defaultWidth - (transLeftMargin + transRightMargin) - (2 * __bgImageMargin)) , (buttonBgHeight - __bgImageMargin)); return FloatRectangle(x, y + ((buttonBgHeight - height) / 2), width, height); } diff --git a/src/ui/inc/FUiCtrl_MessageBoxPresenter.h b/src/ui/inc/FUiCtrl_MessageBoxPresenter.h index fa10d8c..96ed378 100644 --- a/src/ui/inc/FUiCtrl_MessageBoxPresenter.h +++ b/src/ui/inc/FUiCtrl_MessageBoxPresenter.h @@ -192,6 +192,7 @@ private: int __buttonNum; float __prevPositionY; float __textObjHeight; + float __bgImageMargin; bool __touchPressFlag; bool __scrollStart; diff --git a/src/ui/inc/FUiCtrl_ProgressPopupPresenter.h b/src/ui/inc/FUiCtrl_ProgressPopupPresenter.h index 3fe2fc8..97a809f 100644 --- a/src/ui/inc/FUiCtrl_ProgressPopupPresenter.h +++ b/src/ui/inc/FUiCtrl_ProgressPopupPresenter.h @@ -111,6 +111,7 @@ private: Tizen::Base::Collection::ArrayList* __pAnimationFrameList; float __textObjectHeight; + float __bgImageMargin; int __currentIndex; bool __buttonPressState; diff --git a/src/ui/inc/FUi_ResourceMessageBoxConfig.h b/src/ui/inc/FUi_ResourceMessageBoxConfig.h index a6a9989..b00880d 100644 --- a/src/ui/inc/FUi_ResourceMessageBoxConfig.h +++ b/src/ui/inc/FUi_ResourceMessageBoxConfig.h @@ -53,6 +53,7 @@ DECLARE_UI_CONFIG(MESSAGEBOX); DECLARE_IMAGE_CONFIG(BOTTOM_BUTTON_DISABLED_EFFECT, 13); DECLARE_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 1); + DECLARE_FIXED_VALUE_CONFIG(BG_IMAGE_MARGIN, 2); DECLARE_SHAPE_CONFIG(MIN_WIDTH, 1); DECLARE_SHAPE_CONFIG(MIN_HEIGHT, 2); DECLARE_SHAPE_CONFIG(DEFAULT_WIDTH, 3); diff --git a/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp b/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp index 9b43607..83ffa18 100644 --- a/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp +++ b/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp @@ -61,6 +61,7 @@ START_UI_CONFIG(MESSAGEBOX); START_UI_CONFIG_MODE(720x1280); { ADD_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 399); + ADD_FIXED_VALUE_CONFIG(BG_IMAGE_MARGIN, 1); ADD_SHAPE_CONFIG(MIN_WIDTH, 510); // 20120504 ADD_SHAPE_CONFIG(MIN_HEIGHT, 122); // 20120803 -- 2.7.4