float textTopGap = 0.0f;
float textBottomGap = 0.0f;
float bottomHeight = 0.0f;
+ float minHeight = 0.0f;
_ControlOrientation orientation;
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())
{
if (!HasText())
{
textTopGap = 0.0f;
- textBottomGap = 0.0f;
+ textBottomGap = textBottomGap * 1.5f;
}
if (!HasButton())
bottomHeight = 0.0f;
}
- float totalH = transTopMargin
- + transBottomMargin
- + titleHeight
+
+ float totalH = titleHeight
+ noTitleHeigth
+ animationWidth
+ textTopGap
+ bottomHeight
+ __pProgressPopupPresenter->GetBodyTextObjHeight();
+
+ if (minHeight > totalH)
+ {
+ totalH = minHeight;
+ }
+
+ totalH = totalH + transTopMargin + transBottomMargin;
+
return totalH;
}
}
else
{
- animationBounds = __animationRect;
+ animationBounds = FloatRectangle((GetBoundsF().width - animationWidth) / 2.0f, noTitleProcessTop + transTopMargin, animationWidth, animationWidth);
}
return animationBounds;
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));
__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);
}