modified messageBox GUI(margin, landscape width)
authorDongJinJeon <dongjin2193.jeon@samsung.com>
Wed, 3 Apr 2013 07:11:18 +0000 (16:11 +0900)
committerDongJinJeon <dongjin2193.jeon@samsung.com>
Wed, 3 Apr 2013 07:11:18 +0000 (16:11 +0900)
Change-Id: Iafe1c9ee67366ac48825ac54d1d031790d7e4c83
Signed-off-by: DongJinJeon <dongjin2193.jeon@samsung.com>
src/ui/controls/FUiCtrl_MessageBox.cpp
src/ui/controls/FUiCtrl_MessageBoxImpl.cpp
src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp
src/ui/resource/FUi_ResourceMessageBoxConfig.cpp

index b5e616f..bfa7d46 100644 (file)
@@ -332,9 +332,7 @@ _MessageBox::OnChangeLayout(_ControlOrientation orientation)
 {
        SysTryReturnVoidResult(NID_UI_CTRL, _pDimmingLayer != null, E_SYSTEM, "[E_SYSTEM] There is no Dimming Layer.");
 
-       result r = E_SUCCESS;
-
-       r = __pMsgboxPresenter->OnChangeLayout(orientation);
+       result r = __pMsgboxPresenter->OnChangeLayout(orientation);
        SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
 
        r = _pDimmingLayer->Rearrange();
index c3e371c..fb937c6 100644 (file)
@@ -273,7 +273,10 @@ _MessageBoxImpl::OnChangeLayout(_ControlOrientation orientation)
 
        totalH = GetCore().GetTotalHeight();
 
-       totalH = (totalH < maxHeight) ? totalH : maxHeight;
+       if (totalH > maxHeight)
+       {
+               totalH = maxHeight;
+       }
 
        bounds = GetCenterAlignRect(defaultWidth, totalH);
 
index 5423d66..860e782 100644 (file)
@@ -146,7 +146,6 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
        float tempHeight = 0.0f;
 
        GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth);
-       GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, orientation, titleHeight);
        GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight);
        GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight);
 
@@ -168,6 +167,7 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
        // TitleText
        if (__pMessageBox->HasTitle() == true)
        {
+               GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, orientation, titleHeight);
 
                __titleBounds.width = __textBounds.width;
                __pTitleTextObject->SetBounds(__titleBounds);
@@ -177,10 +177,6 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
                __titleBounds.height = __pTitleTextObject->GetTotalHeightF();
 
        }
-       else
-       {
-               titleHeight = 0;
-       }
 
        // Text
        __pBodyTextObject->SetBounds(__textBounds);
@@ -192,7 +188,10 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
        totalHeightExceptTextObj = titleHeight + (textTopMargin * 2.0f) + bottomHeight + (transTopMargin + transBottomMargin);
        tempHeight = maxHeight - (totalHeightExceptTextObj + __textObjHeight);
 
-       __textObjHeight = (tempHeight > 0.0f) ? __textObjHeight : __textObjHeight + tempHeight;
+       if (tempHeight < 0.0f)
+       {
+               __textObjHeight += tempHeight;
+       }
 
        __textBounds.height = __textObjHeight;
 
@@ -203,11 +202,7 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
        {
                float maxH = __pBodyTextObject->GetTotalHeightF();
 
-               if (__pScroll != null)
-               {
-                       __pMessageBox->AttachSystemChild(*__pScroll);
-               }
-               else
+               if (__pScroll == null)
                {
                        __pScroll = _Scroll::CreateScrollN(*__pMessageBox,
                                                                        SCROLL_DIRECTION_VERTICAL,
@@ -227,8 +222,8 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
        else if (__pScroll != null)
        {
                __pMessageBox->DetachSystemChild(*__pScroll);
-               //delete __pScroll;
-               //__pScroll = null;
+               delete __pScroll;
+               __pScroll = null;
        }
 
        for (int i = 0; i < __buttonNum; i++)
@@ -690,7 +685,7 @@ _MessageBoxPresenter::CreateButtons(void)
                if (pButtonCore != null)
                {
                        pButtonCore->SetTouchPressThreshold(0.16);
-                       __pMessageBox->AttachChild(pImpl->GetCore());
+                       __pMessageBox->AttachChild(*pButtonCore);
                }
        }
 
index 07edcdc..254b54c 100755 (executable)
@@ -84,7 +84,7 @@ START_UI_CONFIG(MESSAGEBOX);
                ADD_SHAPE_CONFIG(DEFAULT_WIDTH, 900);                       // 20130403
                ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_01, 200);           // 20130403 : 1 Button
        }
-       END_UI_CONFIG_MODE(720x1280);
+       END_UI_CONFIG_MODE(1280x720);
 
 }
 END_UI_CONFIG(MESSAGEBOX);