From 056cbd150dc91dfe1e281dfc2d7ab1910ae229f5 Mon Sep 17 00:00:00 2001 From: Choongeun Hong Date: Tue, 23 Apr 2013 20:36:22 +0900 Subject: [PATCH] Fixed progresspopup issue Change-Id: I1d60d72ef652ae3d11d132ddc859319b4274c2fe Signed-off-by: Choongeun Hong --- src/ui/controls/FUiCtrl_ProgressPopup.cpp | 20 +++++++++++++++----- src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp | 2 +- src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp | 11 ++++++----- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/ui/controls/FUiCtrl_ProgressPopup.cpp b/src/ui/controls/FUiCtrl_ProgressPopup.cpp index 9eb4a92..740a4b7 100644 --- a/src/ui/controls/FUiCtrl_ProgressPopup.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPopup.cpp @@ -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; diff --git a/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp b/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp index f420487..406b672 100644 --- a/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp @@ -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)); diff --git a/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp b/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp index d932981..1a6cd5b 100644 --- a/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp @@ -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); } -- 2.7.4