FloatDimension softkeyDimension(0.0f, 0.0f);
FloatDimension softkeyDisplayDimension(0.0f, 0.0f);
FloatDimension optionkeyDimension(0.0f, 0.0f);
- float softkeyTextSize = 0.0;
+ float fontSize = 0.0f;
+ float multilineFontSize = 0.0f;
float leftSoftkeyLeftMargin = 0.0f;
float rightSoftkeyLeftMargin = 0.0f;
float softkeyTopMargin = 0.0f;
GET_DIMENSION_CONFIG(FOOTER::SOFTKEY_RECT, GetOrientation(), softkeyDimension);
GET_DIMENSION_CONFIG(FOOTER::SOFTKEY_DISPLAY_RECT_WITH_TEXT, GetOrientation(), softkeyDisplayDimension);
GET_DIMENSION_CONFIG(FOOTER::OPTIONKEY_RECT, GetOrientation(), optionkeyDimension);
- GET_SHAPE_CONFIG(FOOTER::SOFTKEY_TEXT_SIZE, GetOrientation(), softkeyTextSize);
+ GET_SHAPE_CONFIG(FOOTER::SOFTKEY_TEXT_SIZE, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(FOOTER::SOFTKEY_MULTILINE_TEXT_SIZE, GetOrientation(), multilineFontSize);
GET_SHAPE_CONFIG(FOOTER::SOFTKEY_0_LEFT_MARGIN, GetOrientation(), leftSoftkeyLeftMargin);
GET_SHAPE_CONFIG(FOOTER::SOFTKEY_1_LEFT_MARGIN, GetOrientation(), rightSoftkeyLeftMargin);
GET_SHAPE_CONFIG(FOOTER::SOFTKEY_TOP_MARGIN, GetOrientation(), softkeyTopMargin);
if (formStyle & FORM_STYLE_SOFTKEY_0)
{
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalBitmap[_SOFTKEY_0])
{
__pSoftkeyNormalBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
delete pTempBitmap;
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyPressedBitmap[_SOFTKEY_0])
{
__pSoftkeyPressedBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
delete pTempBitmap;
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalEffectBitmap[_SOFTKEY_0])
{
__pSoftkeyNormalEffectBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
delete pTempBitmap;
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyPressedEffectBitmap[_SOFTKEY_0])
{
if (pButton)
{
pButton->SetSize(softkeyDimension);
- pButton->SetTextSize(softkeyTextSize);
+ pButton->SetTextSize(fontSize);
+ pButton->SetMultilineTextSize(multilineFontSize);
pButton->SetUserDefinedTextArea(FloatRectangle(leftSoftkeyLeftMargin, softkeyTopMargin, softkeyDisplayDimension.width, softkeyDisplayDimension.height));
pButton->SetTextColor(_BUTTON_STATUS_NORMAL, softkeyNormalTextColor);
pButton->SetTextColor(_BUTTON_STATUS_PRESSED, softkeyPressedTextColor);
if (formStyle & FORM_STYLE_SOFTKEY_1)
{
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalBitmap[_SOFTKEY_1])
{
__pSoftkeyNormalBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
delete pTempBitmap;
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyPressedBitmap[_SOFTKEY_1])
{
__pSoftkeyPressedBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
delete pTempBitmap;
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalEffectBitmap[_SOFTKEY_1])
{
__pSoftkeyNormalEffectBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
delete pTempBitmap;
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyPressedEffectBitmap[_SOFTKEY_1])
{
if (pButton)
{
pButton->SetSize(softkeyDimension);
- pButton->SetTextSize(softkeyTextSize);
+ pButton->SetTextSize(fontSize);
+ pButton->SetMultilineTextSize(multilineFontSize);
pButton->SetUserDefinedTextArea(FloatRectangle(rightSoftkeyLeftMargin, softkeyTopMargin, softkeyDisplayDimension.width, softkeyDisplayDimension.height));
pButton->SetTextColor(_BUTTON_STATUS_NORMAL, softkeyNormalTextColor);
pButton->SetTextColor(_BUTTON_STATUS_PRESSED, softkeyPressedTextColor);
ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
}
}
+
+ SetTransBackButton(true);
}
else // not transparent
{
ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
}
}
+
+ SetTransBackButton(false);
}
delete pMagentaBackgroundBitmap;
float vmargin = 0.0f;
float blockWidth[__itemCount];
float fontSize = 0.0f;
+ float multilineFontSize = 0.0f;
GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), leftMargin);
GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth);
{
segmentedItemHeight = __itemArea.height;
GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_MARGIN, GetOrientation(), vmargin);
- GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetOrientation(), fontSize);
}
else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
{
GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedItemHeight);
GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), vmargin);
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize);
}
if (__itemCount == 1 || __itemCount == 2)
}
}
}
+
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30
+
+ if (__style == TOOLBAR_HEADER_SEGMENTED)
+ {
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize); // 28
+ }
+ else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
+ {
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24
+ }
}
else if (__itemCount == 3)
{
}
}
}
+
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26
+
+ if (__style == TOOLBAR_HEADER_SEGMENTED)
+ {
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), multilineFontSize); // 26
+ }
+ else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
+ {
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); //24
+ }
}
else if (__itemCount == 4)
{
}
}
}
+
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize);
}
for (int i = 0; i < __itemCount; i++)
{
__pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD);
+ __pItems.at(i)->SetMultilineTextSize(multilineFontSize);
RealignItem(__pItems.at(i));
}
float dividerWidth = 0.0f;
float blockWidth[__itemCount];
float fontSize = 0.0f;
+ float multilineFontSize = 0.0f;
float itemButtonLeftGap = 0.0f;
float itemButtonRightGap = 0.0f;
}
}
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize);
}
else if (__itemCount == 3)
{
}
}
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), multilineFontSize);
}
else if (__itemCount == 4)
{
}
}
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize);
}
for (int i = 0; i < __itemCount ; i++)
{
__pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD);
+ __pItems.at(i)->SetMultilineTextSize(multilineFontSize);
RealignItem(__pItems.at(i));
}
{
float itemWidth[__itemCount];
float fontSize = 0.0f;
+ float multilineFontSize = 0.0f;
float segmentedItemHeight = 0.0f;
float tabLeftMargin = 0.0f;
float vmargin = 0.0f;
itemWidth[0] = __itemArea.width - tabLeftMargin * 2;
__pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
+
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30
+
if (__style == TOOLBAR_TAB)
{
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize); // 28
}
else if (__style == TOOLBAR_TAB_WITH_TITLE)
{
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24
}
}
else if (__itemCount == 2)
__pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1], segmentedItemHeight));
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30
+
if (__style == TOOLBAR_TAB)
{
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize); // 28
}
else if (__style == TOOLBAR_TAB_WITH_TITLE)
{
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24
}
}
else if (__itemCount == 3)
__pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1], segmentedItemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + dividerWidth * 2, vmargin, itemWidth[2], segmentedItemHeight));
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26
+
if (__style == TOOLBAR_TAB)
{
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), multilineFontSize); // 26
}
else if (__style == TOOLBAR_TAB_WITH_TITLE)
{
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24
}
}
else
__pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + itemWidth[2] + dividerWidth * 3,
vmargin, itemWidth[3], segmentedItemHeight));
- GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize); // 24
+ GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24
}
for (int i = 4; i < __itemCount ; i++)
for (int i = 0; i < __itemCount ; i++)
{
__pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD);
+ __pItems.at(i)->SetMultilineTextSize(multilineFontSize);
if (__pItems.at(i)->GetChildCount() != 0)
{
float segmentedItemHeight = 0.0f;
float headerLeftMargin = 0.0f;
float blockWidth[__itemCount];
+ float fontSize = 0.0f;
+ float multilineFontSize = 0.0f;
GET_SHAPE_CONFIG(HEADER::SIP_FOOTER_ITEM_TOP_MARGIN, GetOrientation(), sipFooterItemTopMargin);
GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth);
}
}
- float buttonTextFontSize = 0.0f;
+ GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_FONT_SIZE, GetOrientation(), fontSize);//32
for (int i = 0; i < __itemCount; i++)
{
if (__style == TOOLBAR_ICON_TEXT && (__pItems.at(i)->GetBitmap(_BUTTON_STATUS_NORMAL) || __pItems.at(i)->GetBitmap(_BUTTON_STATUS_PRESSED)))
{
- if (__itemCount == 1 || __itemCount == 2)
+ if (__itemCount == 5)
{
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, GetOrientation(), buttonTextFontSize);
+ GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, GetOrientation(), multilineFontSize);//18
}
- else if (__itemCount == 3)
- {
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, GetOrientation(), buttonTextFontSize);
- }
- else if (__itemCount == 4)
- {
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, GetOrientation(), buttonTextFontSize);
- }
- else if (__itemCount == 5)
+ else
{
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, GetOrientation(), buttonTextFontSize);
+ GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, GetOrientation(), multilineFontSize);//22
}
}
else
{
- if (__itemCount == 1 || __itemCount == 2)
+ if (__itemCount == 5)
{
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, GetOrientation(), buttonTextFontSize);
+ GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, GetOrientation(), multilineFontSize);//22
}
- else if (__itemCount == 3)
- {
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, GetOrientation(), buttonTextFontSize);
- }
- else if (__itemCount == 4)
- {
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, GetOrientation(), buttonTextFontSize);
- }
- else if (__itemCount == 5)
+ else
{
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, GetOrientation(), buttonTextFontSize);
+ GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, GetOrientation(), multilineFontSize);//24
}
}
- __pItems.at(i)->SetTextSize(buttonTextFontSize, FONT_STYLE_BOLD);
+ __pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD);
+ __pItems.at(i)->SetMultilineTextSize(multilineFontSize);
RealignItem(__pItems.at(i));
}
float buttonHeight = __pButtonItems[BACK_BUTTON]->GetSizeF().height;
bool themeBackNormalBitmap = IS_CUSTOM_BITMAP(FOOTER::BACK_ICON_NORMAL);
+ float leftTouchMargin = __pButtonItems[BACK_BUTTON]->GetLeftTouchMarginF();
+ float topTouchMargin = __pButtonItems[BACK_BUTTON]->GetTopTouchMarginF();
+ float rightTouchMargin = __pButtonItems[BACK_BUTTON]->GetRightTouchMarginF();
+ float bottomTouchMargin = __pButtonItems[BACK_BUTTON]->GetBottomTouchMarginF();
+
GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_ICON_SIZE, GetOrientation(), iconSize);
_AccessibilityElement* pBackButtonElement = __pButtonItems[BACK_BUTTON]->GetAccessibilityContainer()->GetChildElement(0);
pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pIconNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), normalColor);
if (pColorReplacedBitmap)
{
- __pButtonItems[BACK_BUTTON]->SetBitmap(_BUTTON_STATUS_NORMAL,
- FloatPoint((buttonWidth - iconSize) / 2, (buttonHeight - iconSize) / 2), *pColorReplacedBitmap);
+ __pButtonItems[BACK_BUTTON]->SetBitmap(_BUTTON_STATUS_NORMAL, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pColorReplacedBitmap);
delete pColorReplacedBitmap;
}
+ pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pIconNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), disabledColor);
+ if (pColorReplacedBitmap)
+ {
+ __pButtonItems[BACK_BUTTON]->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pColorReplacedBitmap);
+ delete pColorReplacedBitmap;
+ }
+
pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pIconNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), pressedColor);
if (pColorReplacedBitmap)
{
- __pButtonItems[BACK_BUTTON]->SetBitmap(_BUTTON_STATUS_PRESSED,
- FloatPoint((buttonWidth - iconSize) / 2, (buttonHeight - iconSize) / 2), *pColorReplacedBitmap);
+ __pButtonItems[BACK_BUTTON]->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pColorReplacedBitmap);
delete pColorReplacedBitmap;
}
- pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pIconNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), disabledColor);
+ pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pIconNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), normalColor);
if (pColorReplacedBitmap)
{
- __pButtonItems[BACK_BUTTON]->SetBitmap(_BUTTON_STATUS_DISABLED,
- FloatPoint((buttonWidth - iconSize) / 2, (buttonHeight - iconSize) / 2), *pColorReplacedBitmap);
+ __pButtonItems[BACK_BUTTON]->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pColorReplacedBitmap);
+ delete pColorReplacedBitmap;
+ }
+
+ pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pIconNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), normalColor);
+ if (pColorReplacedBitmap)
+ {
+ __pButtonItems[BACK_BUTTON]->SetBitmap(_BUTTON_STATUS_SELECTED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pColorReplacedBitmap);
delete pColorReplacedBitmap;
}
if (pIconNormalEffectBitmap)
{
- __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_NORMAL, FloatPoint((buttonWidth - iconSize) / 2, (buttonHeight - iconSize) / 2), *pIconNormalEffectBitmap);
- __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_PRESSED, FloatPoint((buttonWidth - iconSize) / 2, (buttonHeight - iconSize) / 2), *pIconNormalEffectBitmap);
- __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_SELECTED, FloatPoint((buttonWidth - iconSize) / 2, (buttonHeight - iconSize) / 2), *pIconNormalEffectBitmap);
- __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint((buttonWidth - iconSize) / 2, (buttonHeight - iconSize) / 2), *pIconNormalEffectBitmap);
- __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_DISABLED, FloatPoint((buttonWidth - iconSize) / 2, (buttonHeight - iconSize) / 2), *pIconNormalEffectBitmap);
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_NORMAL, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_DISABLED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_PRESSED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_SELECTED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
+
+ delete pIconNormalEffectBitmap;
+ }
+
+ return E_SUCCESS;
+}
+
+result
+_Toolbar::SetTransBackButton(bool transparent)
+{
+ SysTryReturnResult(NID_UI_CTRL, __pButtonItems[BACK_BUTTON], E_INVALID_OPERATION,
+ "[E_INVALID_OPERATION] BackButton is not exist.");
+
+ Bitmap* pIconNormalEffectBitmap = null;
+
+ float iconSize = 0.0f;
+ float buttonWidth = __pButtonItems[BACK_BUTTON]->GetSizeF().width;
+ float buttonHeight = __pButtonItems[BACK_BUTTON]->GetSizeF().height;
+ bool themeBackNormalBitmap = IS_CUSTOM_BITMAP(FOOTER::BACK_ICON_NORMAL);
+
+ float leftTouchMargin = __pButtonItems[BACK_BUTTON]->GetLeftTouchMarginF();
+ float topTouchMargin = __pButtonItems[BACK_BUTTON]->GetTopTouchMarginF();
+ float rightTouchMargin = __pButtonItems[BACK_BUTTON]->GetRightTouchMarginF();
+ float bottomTouchMargin = __pButtonItems[BACK_BUTTON]->GetBottomTouchMarginF();
+
+ GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_ICON_SIZE, GetOrientation(), iconSize);
+
+ if (transparent)
+ {
+ if (!themeBackNormalBitmap)
+ {
+ GET_BITMAP_CONFIG_N(FOOTER::BACK_ICON_TRANSLUCENT_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pIconNormalEffectBitmap);
+ }
+ }
+ else
+ {
+ if (!themeBackNormalBitmap)
+ {
+ GET_BITMAP_CONFIG_N(FOOTER::BACK_ICON_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pIconNormalEffectBitmap);
+ }
+ }
+
+ if (pIconNormalEffectBitmap)
+ {
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_NORMAL, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_DISABLED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_PRESSED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
+ __pButtonItems[BACK_BUTTON]->SetEffectBitmap(_BUTTON_STATUS_SELECTED, FloatPoint((buttonWidth - (leftTouchMargin + rightTouchMargin) - iconSize) / 2,
+ (buttonHeight - (topTouchMargin + bottomTouchMargin) - iconSize) / 2), *pIconNormalEffectBitmap);
delete pIconNormalEffectBitmap;
}