Fixed progresspopup issue
authorChoongeun Hong <cheun.hong@samsung.com>
Tue, 23 Apr 2013 11:36:22 +0000 (20:36 +0900)
committerChoongeun Hong <cheun.hong@samsung.com>
Tue, 23 Apr 2013 11:39:35 +0000 (20:39 +0900)
Change-Id: I1d60d72ef652ae3d11d132ddc859319b4274c2fe
Signed-off-by: Choongeun Hong <cheun.hong@samsung.com>
src/ui/controls/FUiCtrl_ProgressPopup.cpp
src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp
src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp

index 9eb4a92..740a4b7 100644 (file)
@@ -344,6 +344,7 @@ _ProgressPopup::GetTotalHeight(void) const
        float textTopGap = 0.0f;
        float textBottomGap = 0.0f;
        float bottomHeight = 0.0f;
+       float minHeight = 0.0f;
 
        _ControlOrientation orientation;
 
@@ -358,6 +359,8 @@ _ProgressPopup::GetTotalHeight(void) const
        GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
 
        GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight);
+       GET_SHAPE_CONFIG(MESSAGEBOX::MIN_HEIGHT, orientation, minHeight);
+
 
        if (HasTitle())
        {
@@ -371,7 +374,7 @@ _ProgressPopup::GetTotalHeight(void) const
        if (!HasText())
        {
                textTopGap = 0.0f;
-               textBottomGap = 0.0f;
+               textBottomGap = textBottomGap * 1.5f;
        }
 
        if (!HasButton())
@@ -379,9 +382,8 @@ _ProgressPopup::GetTotalHeight(void) const
                bottomHeight = 0.0f;
        }
 
-       float totalH = transTopMargin
-               + transBottomMargin
-                       + titleHeight
+
+       float totalH = titleHeight
                        + noTitleHeigth
                        + animationWidth
                        + textTopGap
@@ -389,6 +391,14 @@ _ProgressPopup::GetTotalHeight(void) const
                        + bottomHeight
                        + __pProgressPopupPresenter->GetBodyTextObjHeight();
 
+
+       if (minHeight > totalH)
+       {
+               totalH = minHeight;
+       }
+
+       totalH = totalH + transTopMargin + transBottomMargin;
+
        return totalH;
 }
 
@@ -438,7 +448,7 @@ _ProgressPopup::GetAnimationRect(void) const
        }
        else
        {
-               animationBounds = __animationRect;
+               animationBounds = FloatRectangle((GetBoundsF().width - animationWidth) / 2.0f, noTitleProcessTop + transTopMargin, animationWidth, animationWidth);
        }
 
        return animationBounds;
index f420487..406b672 100644 (file)
@@ -109,7 +109,7 @@ _ProgressPopupImpl::Initialize(bool cancelButton, bool transparent)
        r = GetCore().Initialize(cancelButton, transparent, animationRect);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       if (!cancelButton || transparent)
+       if (transparent)
        {
                r = SetBounds(animationRect);
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
index d932981..1a6cd5b 100644 (file)
@@ -421,15 +421,16 @@ _ProgressPopupPresenter::SetProcessAnimation(void)
                __pAnimation->AddAnimationEventListener(*this);
 
                FloatRectangle animationBounds = __pProgressPopup->GetAnimationRect();
-               if (__pProgressPopup->HasTitle() || __pProgressPopup->HasText() || __pProgressPopup->HasButton())
-               {
-                       __pAnimation->SetBounds(FloatRectangle(animationBounds.x, animationBounds.y, animationBounds.width, animationBounds.height));
-               }
-               else
+
+               if (__transparent)
                {
                        __pAnimation->GetVisualElement()->SetOpacity(0.6f);
                        __pAnimation->SetBounds(FloatRectangle(0.0f, 0.0f, animationBounds.width, animationBounds.height));
                }
+               else //(__pProgressPopup->HasTitle() || __pProgressPopup->HasText() || __pProgressPopup->HasButton())
+               {
+                       __pAnimation->SetBounds(FloatRectangle(animationBounds.x, animationBounds.y, animationBounds.width, animationBounds.height));
+               }
 
                __pProgressPopup->AttachChild(*__pAnimation);
        }