Changed the BottomBg Bitmap drawing position.
authorsriram.k <sriram.k@samsung.com>
Wed, 10 Jul 2013 07:34:13 +0000 (13:04 +0530)
committersriram.k <sriram.k@samsung.com>
Wed, 10 Jul 2013 11:06:09 +0000 (16:36 +0530)
Signed-off-by: sriram.k <sriram.k@samsung.com>
Change-Id: I8b1395ca5778e37fa3c73af81fa8509a0bbb1efa

src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp
src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp
src/ui/inc/FUiCtrl_MessageBoxPresenter.h
src/ui/inc/FUiCtrl_ProgressPopupPresenter.h
src/ui/inc/FUi_ResourceMessageBoxConfig.h
src/ui/resource/FUi_ResourceMessageBoxConfig.cpp

index 1cc9494..90db10e 100644 (file)
@@ -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));
index 6409bd5..77ba40b 100644 (file)
@@ -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);
 }
index fa10d8c..96ed378 100644 (file)
@@ -192,6 +192,7 @@ private:
        int __buttonNum;
        float __prevPositionY;
        float __textObjHeight;
+       float __bgImageMargin;
 
        bool __touchPressFlag;
        bool __scrollStart;
index 3fe2fc8..97a809f 100644 (file)
@@ -111,6 +111,7 @@ private:
        Tizen::Base::Collection::ArrayList* __pAnimationFrameList;
 
        float __textObjectHeight;
+       float __bgImageMargin;
        int __currentIndex;
 
        bool __buttonPressState;
index a6a9989..b00880d 100644 (file)
@@ -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);
index 9b43607..83ffa18 100644 (file)
@@ -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