{
result r = E_SUCCESS;
- if (hasTitle)
- {
- FloatDimension minSize(0.0f, 0.0f);
-
- r = GET_DIMENSION_CONFIG(POPUP::MIN_SIZE_WITH_TITLE, GetCore().GetOrientation(), minSize);
-
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] A system error occurred.", GetErrorMessage(r));
-
- SysTryReturn(NID_UI_CTRL,
- (minSize.width <= dim.width && minSize.height <= dim.height), E_INVALID_ARG,
- E_INVALID_ARG, "[E_INVALID_ARG] The size is out of minimum size(%f, %f)",
- minSize.width, minSize.height);
-
- r = GetCore().SetMinimumSize(minSize);
-
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] SetMinimumSize is failed.", GetErrorMessage(r));
- }
-
FloatRectangle bounds = GetCenterAlignedRect(dim.width, dim.height);
__init = true;
_centerAlign = true;
#include <FGrp_TextTextSimple.h>
#include "FUi_ControlManager.h"
#include "FUi_CoordinateSystemUtils.h"
+#include "FUi_Math.h"
#include "FUi_ModalLoopManager.h"
#include "FUi_ResourceManager.h"
#include "FUi_UiTouchEvent.h"
float bgOutlineEffectRightMargin = 0.0f;
bool isCustomBitmap = false;
+ FloatDimension minSize(0.0f, 0.0f);
+ FloatRectangle pBounds;
+
_ControlOrientation orientation;
orientation = __pPopup->GetOrientation();
GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_BOTTOM_MARGIN, orientation, bgOutlineEffectBottomMargin);
GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_LEFT_MARGIN, orientation, bgOutlineEffectLeftMargin);
GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_RIGHT_MARGIN, orientation, bgOutlineEffectRightMargin);
+ GET_DIMENSION_CONFIG(POPUP::MIN_SIZE_EXCEPT_TRANSPARENT_MARGIN, orientation, minSize);
// Get canvas
Canvas* pCanvas = __pPopup->GetCanvasN();
pBackgroundCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pBackgroundCanvas->Clear();
+ pBounds = __pPopup->GetBoundsF();
// Draw BG
if (__pPopup->GetBackgroundBitmap() != null)
{
FloatRectangle bounds(-transLeftMargin,
-transTopMargin,
- __pPopup->GetBoundsF().width + transLeftMargin + transRightMargin,
- __pPopup->GetBoundsF().height + transTopMargin + transBottomMargin);
+ pBounds.width + transLeftMargin + transRightMargin,
+ pBounds.height + transTopMargin + transBottomMargin);
const Bitmap* pBackgroundBitmap = __pPopup->GetBackgroundBitmap();
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap))
}
// Draw Outline
- if (!isCustomBitmap && __pPopup->GetOutlineBitmap() != null)
+ if (!isCustomBitmap && __pPopup->GetOutlineBitmap() != null &&
+ _FloatCompareGE(pBounds.width, minSize.width) &&
+ _FloatCompareGE(pBounds.height, minSize.height))
{
FloatRectangle bounds(0.0f,
0.0f,
- __pPopup->GetBoundsF().width + bgOutlineEffectLeftMargin + bgOutlineEffectRightMargin,
- __pPopup->GetBoundsF().height + bgOutlineEffectTopMargin + bgOutlineEffectBottomMargin);
+ pBounds.width + bgOutlineEffectLeftMargin + bgOutlineEffectRightMargin,
+ pBounds.height + bgOutlineEffectTopMargin + bgOutlineEffectBottomMargin);
const Bitmap* pOutlineBitmap = __pPopup->GetOutlineBitmap();
DECLARE_ANIMATION_CONFIG(PROCESSING_ANIMATION, 1);
DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1);
DECLARE_DIMENSION_CONFIG(MIN_SIZE_WITH_TITLE, 2);
+ DECLARE_DIMENSION_CONFIG(MIN_SIZE_EXCEPT_TRANSPARENT_MARGIN, 3);
DECLARE_SHAPE_CONFIG(TITLE_HEIGHT, 1);
DECLARE_SHAPE_CONFIG(TITLE_TEXT_SIZE, 2);
DECLARE_SHAPE_CONFIG(TITLE_TEXT_TOP_MARGIN, 3);