float rightMargin = __pButton->GetRightMarginF();
float bottomMargin = __pButton->GetBottomMarginF();
- float leftTouchMargin = __pButton->GetLeftTouchMarginF();
- float topTouchMargin = __pButton->GetTopTouchMarginF();
- float rightTouchMargin = __pButton->GetRightTouchMarginF();
- float bottomTouchMargin = __pButton->GetBottomTouchMarginF();
-
__pTextObject->RemoveAll(true);
pSimpleText = new (std::nothrow) TextSimple(const_cast<wchar_t*>(__pButton->GetText().GetPointer()), __pButton->GetText().GetLength());
SetTextSize(__pButton->GetTextSizeF());
__pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE);
- __pTextObject->SetBounds(FloatRectangle(leftMargin + leftTouchMargin, topMargin + topTouchMargin,
- __pButton->GetBoundsF().width - (leftMargin + rightMargin) - (leftTouchMargin + rightTouchMargin),
- __pButton->GetBoundsF().height - (topMargin + bottomMargin) - (topTouchMargin + bottomTouchMargin)));
+ __pTextObject->SetBounds(FloatRectangle(leftMargin, topMargin,
+ __pButton->GetBoundsF().width - (leftMargin + rightMargin),
+ __pButton->GetBoundsF().height - (topMargin + bottomMargin)));
__pTextObject->Compose();
return E_SUCCESS;
Color bgColor = __pButton->GetBackgroundColor();
String imagePath = L"";
- float leftTouchMargin = __pButton->GetLeftTouchMarginF();
- float topTouchMargin = __pButton->GetTopTouchMarginF();
- float rightTouchMargin = __pButton->GetRightTouchMarginF();
- float bottomTouchMargin = __pButton->GetBottomTouchMarginF();
-
- FloatRectangle bounds(leftTouchMargin, topTouchMargin, __pButton->GetBoundsF().width - (leftTouchMargin + rightTouchMargin)
- , __pButton->GetBoundsF().height - (topTouchMargin + bottomTouchMargin));
+ FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width,
+ __pButton->GetBoundsF().height);
_ButtonStatus status = __pButton->GetButtonStatus();
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
- float leftTouchMargin = __pButton->GetLeftTouchMarginF();
- float topTouchMargin = __pButton->GetTopTouchMarginF();
- float rightTouchMargin = __pButton->GetRightTouchMarginF();
- float bottomTouchMargin = __pButton->GetBottomTouchMarginF();
-
_ButtonStatus status = __pButton->GetButtonStatus();
Bitmap* pToolbarItemBackgroundBitmap = __pButton->GetToolbarItemBackgroundBitmap(status);
if (pToolbarItemBackgroundBitmap)
{
- FloatRectangle bounds(leftTouchMargin, topTouchMargin, __pButton->GetBoundsF().width - (leftTouchMargin + rightTouchMargin),
- __pButton->GetBoundsF().height - (topTouchMargin + bottomTouchMargin));
+ FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, __pButton->GetBoundsF().height);
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pToolbarItemBackgroundBitmap))
{
Bitmap* pEffectBitmap = __pButton->GetEffectBitmap(status);
Bitmap* pNormalEffectBitmap = __pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL);
- float leftTouchMargin = __pButton->GetLeftTouchMarginF();
- float topTouchMargin = __pButton->GetTopTouchMarginF();
- float rightTouchMargin = __pButton->GetRightTouchMarginF();
- float bottomTouchMargin = __pButton->GetBottomTouchMarginF();
-
- FloatRectangle bounds(leftTouchMargin, topTouchMargin, __pButton->GetBoundsF().width - (leftTouchMargin + rightTouchMargin),
- __pButton->GetBoundsF().height - (topTouchMargin + bottomTouchMargin));
+ FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, __pButton->GetBoundsF().height);
if (pBitmap)
{
return;
}
- if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(status).x - rightTouchMargin < pBitmap->GetWidthF()
- || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(status).y - bottomTouchMargin < pBitmap->GetHeightF())
+ if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(status).x < pBitmap->GetWidthF()
+ || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(status).y < pBitmap->GetHeightF())
{
pCanvas->DrawBitmap(bounds, *pBitmap, FloatRectangle(0.0f, 0.0f, pBitmap->GetWidthF(), pBitmap->GetHeightF()));
return;
}
- if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).x - rightTouchMargin < pNormalBitmap->GetWidthF()
- || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).y - bottomTouchMargin < pNormalBitmap->GetHeightF())
+ if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).x < pNormalBitmap->GetWidthF()
+ || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).y < pNormalBitmap->GetHeightF())
{
pCanvas->DrawBitmap(bounds, *pNormalBitmap, FloatRectangle(0.0f, 0.0f, pNormalBitmap->GetWidthF(), pNormalBitmap->GetHeightF()));
float rightMargin = __pButton->GetRightMarginF();
float bottomMargin = __pButton->GetBottomMarginF();
- float leftTouchMargin = __pButton->GetLeftTouchMarginF();
- float topTouchMargin = __pButton->GetTopTouchMarginF();
- float rightTouchMargin = __pButton->GetRightTouchMarginF();
- float bottomTouchMargin = __pButton->GetBottomTouchMarginF();
-
Canvas* pCanvas = __pButton->GetCanvasN();
if (pCanvas == null)
{
//pSimpleText = new (std::nothrow) TextSimple(const_cast<wchar_t*>(__pButton->GetText().GetPointer()), __pButton->GetText().GetLength());
//__pTextObject->AppendElement(*pSimpleText);
- __textRect = FloatRectangle(leftMargin + leftTouchMargin, topMargin + topTouchMargin,
- __pButton->GetBoundsF().width - (leftMargin + rightMargin) - (leftTouchMargin + rightTouchMargin),
- __pButton->GetBoundsF().height - (topMargin + bottomMargin) - (topTouchMargin + bottomTouchMargin));
+ __textRect = FloatRectangle(leftMargin, topMargin,
+ __pButton->GetBoundsF().width - (leftMargin + rightMargin),
+ __pButton->GetBoundsF().height - (topMargin + bottomMargin));
if (__pButton->UserDefinedText())
{
float selectedBitmapHeight = 0.0f;
float segmentedHeight = 0.0f;
- float leftTouchMargin = __pButton->GetLeftTouchMarginF();
- float rightTouchMargin = __pButton->GetRightTouchMarginF();
- float bottomTouchMargin = __pButton->GetBottomTouchMarginF();
-
GET_SHAPE_CONFIG(HEADER::HEADER_ITEM_SELECTED_BITMAP_MARGIN, __pButton->GetOrientation(), selectedBitmapMargin);
GET_SHAPE_CONFIG(HEADER::HEADER_ITEM_SELECTED_BITMAP_HEIGHT, __pButton->GetOrientation(), selectedBitmapHeight);
GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, __pButton->GetOrientation(), segmentedHeight);
return;
}
- FloatRectangle bounds(selectedBitmapMargin + leftTouchMargin,
- __pButton->GetBoundsF().height - bottomTouchMargin - selectedBitmapHeight,
- __pButton->GetBoundsF().width - selectedBitmapMargin * 2 - (leftTouchMargin + rightTouchMargin), selectedBitmapHeight + 1);
+ FloatRectangle bounds(selectedBitmapMargin,
+ __pButton->GetBoundsF().height - selectedBitmapHeight,
+ __pButton->GetBoundsF().width - selectedBitmapMargin * 2, selectedBitmapHeight + 1);
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pUnderlineBitmap))
{
void
_ButtonPresenter::DrawSubTitleEffectBitmap(void)
{
- float leftTouchMargin = __pButton->GetLeftTouchMarginF();
- float topTouchMargin = __pButton->GetTopTouchMarginF();
- float rightTouchMargin = __pButton->GetRightTouchMarginF();
- float bottomTouchMargin = __pButton->GetBottomTouchMarginF();
-
Bitmap* pSubTitleEffectBitmap = __pButton->GetSubTitleEffectBitmap();
if (pSubTitleEffectBitmap)
return;
}
- FloatRectangle bounds(leftTouchMargin, topTouchMargin,
- __pButton->GetBoundsF().width - (leftTouchMargin + rightTouchMargin), __pButton->GetBoundsF().height - (topTouchMargin + bottomTouchMargin));
+ FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, __pButton->GetBoundsF().height);
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pSubTitleEffectBitmap))
{
FloatRectangle bounds = __pButtonItems[position]->GetBoundsF();
- float topTouchMargin = __pButtonItems[position]->GetTopTouchMarginF();
- float rightTouchMargin = __pButtonItems[position]->GetRightTouchMarginF();
-
- bounds.width = bounds.width - rightTouchMargin;
-
float height = 0.0f;
GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT_WITH_BUTTON, GetOrientation(), height);
if (pBadgeIconLabel)
{
- pBadgeIconLabel->SetBounds(FloatRectangle(bounds.width - height, topTouchMargin, height, height));
+ pBadgeIconLabel->SetBounds(FloatRectangle(bounds.width - height, 0, height, height));
pBadgeIconLabel->SetBackgroundBitmap(*pBadgeIcon);
__pButtonItems[position]->AttachChild(*pBadgeIconLabel);
FloatRectangle bounds = __pButtonItems[position]->GetBoundsF();
- float topTouchMargin = __pButtonItems[position]->GetTopTouchMarginF();
- float rightTouchMargin = __pButtonItems[position]->GetRightTouchMarginF();
-
- bounds.width = bounds.width - rightTouchMargin;
-
if (existingBadgeIcon)
{
float fontSize = 0.0f;
GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width);
}
- existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, topTouchMargin, width, height));
+ existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, 0, width, height));
existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
Integer tempNumber(number);
float largeTabTopMargin = 0.0f;
float largeTabTextHeight = 0.0f;
- float leftTouchMargin = pButton->GetLeftTouchMarginF();
- float topTouchMargin = pButton->GetTopTouchMarginF();
- float rightTouchMargin = pButton->GetRightTouchMarginF();
- float bottomTouchMargin = pButton->GetBottomTouchMarginF();
-
GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_LEFT_MARGIN, GetOrientation(), sideMargin);
GET_SHAPE_CONFIG(HEADER::ICON_TEXT_GAP, GetOrientation(), iconTextGap);
GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedTextAreaHeight);
if (pButton->GetBitmap(_BUTTON_STATUS_NORMAL) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_NORMAL,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_NORMAL)));
}
if (pButton->GetBitmap(_BUTTON_STATUS_PRESSED) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_PRESSED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_PRESSED)));
}
if (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED)));
}
if (pButton->GetBitmap(_BUTTON_STATUS_DISABLED) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_DISABLED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_DISABLED)));
}
if (pButton->GetBitmap(_BUTTON_STATUS_SELECTED) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_SELECTED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_SELECTED)));
}
float buttonItemWidth = pButton->GetSizeF().width;
float buttonItemHeight = pButton->GetSizeF().height;
- float leftTouchMargin = pButton->GetLeftTouchMarginF();
- float topTouchMargin = pButton->GetTopTouchMarginF();
- float rightTouchMargin = pButton->GetRightTouchMarginF();
- float bottomTouchMargin = pButton->GetBottomTouchMarginF();
-
if (pButton->GetBitmap(_BUTTON_STATUS_NORMAL) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_NORMAL,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_NORMAL)));
}
if (pButton->GetBitmap(_BUTTON_STATUS_PRESSED) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_PRESSED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_PRESSED)));
}
if (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED)));
}
if (pButton->GetBitmap(_BUTTON_STATUS_DISABLED) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_DISABLED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_DISABLED)));
}
if (pButton->GetBitmap(_BUTTON_STATUS_SELECTED) != null)
{
pButton->SetBitmap(_BUTTON_STATUS_SELECTED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2),
*(pButton->GetBitmap(_BUTTON_STATUS_SELECTED)));
}
if (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL) != null)
{
pButton->SetEffectBitmap(_BUTTON_STATUS_NORMAL,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2),
*(pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL)));
}
if (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED) != null)
{
pButton->SetEffectBitmap(_BUTTON_STATUS_PRESSED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2),
*(pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED)));
}
if (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null)
{
pButton->SetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2),
*(pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED)));
}
if (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED) != null)
{
pButton->SetEffectBitmap(_BUTTON_STATUS_DISABLED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2),
*(pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED)));
}
if (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED) != null)
{
pButton->SetEffectBitmap(_BUTTON_STATUS_SELECTED,
- FloatPoint((buttonItemWidth - (leftTouchMargin + rightTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2,
- (buttonItemHeight - (topTouchMargin + bottomTouchMargin) - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2),
+ FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2,
+ (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2),
*(pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED)));
}
float headerRightMargin = 0.0f;
float tabLeftMargin = 0.0f;
- float leftTouchMargin = 0.0f;
- float topTouchMargin = 0.0f;
- float rightTouchMargin = 0.0f;
- float bottomTouchMargin = 0.0f;
-
GET_SHAPE_CONFIG(HEADER::TOP_MARGIN, GetOrientation(), headerTopMargin);
GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_GAP, GetOrientation(), buttonItemGap);
GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), headerLeftMargin);
{
GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), vmargin);
GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), headerButtonItemHeight);
-
- GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_LEFT_TOUCH_MARGIN, GetOrientation(), leftTouchMargin);
- GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_TOUCH_MARGIN, GetOrientation(), topTouchMargin);
- GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_RIGHT_TOUCH_MARGIN, GetOrientation(), rightTouchMargin);
- GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, GetOrientation(), bottomTouchMargin);
}
else if (__style == TOOLBAR_TAB_WITH_TITLE)
{
GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_MARGIN, GetOrientation(), vmargin);
GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), headerButtonItemHeight);
-
- GET_SHAPE_CONFIG(HEADER::TAB_BUTTON_ITEM_LEFT_TOUCH_MARGIN, GetOrientation(), leftTouchMargin);
- GET_SHAPE_CONFIG(HEADER::TAB_BUTTON_ITEM_TOP_TOUCH_MARGIN, GetOrientation(), topTouchMargin);
- GET_SHAPE_CONFIG(HEADER::TAB_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, GetOrientation(), rightTouchMargin);
- GET_SHAPE_CONFIG(HEADER::TAB_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, GetOrientation(), bottomTouchMargin);
}
else
{
GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_MARGIN, GetOrientation(), vmargin);
GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_HEIGHT, GetOrientation(), headerButtonItemHeight);
-
- GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_LEFT_TOUCH_MARGIN, GetOrientation(), leftTouchMargin);
- GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_TOUCH_MARGIN, GetOrientation(), topTouchMargin);
- GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_RIGHT_TOUCH_MARGIN, GetOrientation(), rightTouchMargin);
- GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, GetOrientation(), bottomTouchMargin);
}
__titleTextArea.x = headerLeftMargin;
{
if (__pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[LEFT_BUTTON]->GetText() == L"")
- {
- if (__pButtonItems[RIGHT_BUTTON]->GetText() == L"")
- {
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
- headerRightButtonWidth, headerButtonItemHeight));
- __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth, vmargin,
- headerLeftButtonWidth, headerButtonItemHeight));
-
- if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
- {
- __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f);
- __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f);
-
- __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
- }
- else
- {
- __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
- __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
-
- __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
-
- if (__style != TOOLBAR_TAB_WITH_TITLE)
- {
- __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
- }
- }
- }
- else
- {
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
- headerRightButtonWidth, headerButtonItemHeight));
- __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
- headerLeftButtonWidth, headerButtonItemHeight));
-
- if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
- {
- //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0, 0, 0, 0);
- __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f);
-
- __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
- }
- else
- {
- //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin);
- __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
-
- __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
+ __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
+ headerRightButtonWidth + 1, headerButtonItemHeight));
+ __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
+ headerLeftButtonWidth, headerButtonItemHeight));
- if (__style != TOOLBAR_TAB_WITH_TITLE)
- {
- __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
- }
- }
- }
+ if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
+ {
+ __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
}
else
{
- if (__pButtonItems[RIGHT_BUTTON]->GetText() == L"")
- {
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
- headerRightButtonWidth, headerButtonItemHeight));
- __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth, vmargin,
- headerLeftButtonWidth, headerButtonItemHeight));
-
- if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
- {
- //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0, 0, 0, 0);
- __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f);
-
- __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
- }
- else
- {
- //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin);
- __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
-
- __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
+ __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
- if (__style != TOOLBAR_TAB_WITH_TITLE)
- {
- __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
- }
- }
- }
- else
+ if (__style != TOOLBAR_TAB_WITH_TITLE)
{
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
- headerRightButtonWidth, headerButtonItemHeight));
- __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
- headerLeftButtonWidth, headerButtonItemHeight));
-
- if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
- {
- //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0, 0, 0, 0);
- //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0, 0, 0, 0);
-
- __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
- }
- else
- {
- //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin);
- //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin);
-
- __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
-
- if (__style != TOOLBAR_TAB_WITH_TITLE)
- {
- __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
- }
- }
+ __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth);
}
}
}
else
{
- if (__pButtonItems[RIGHT_BUTTON]->GetText() == L"")
- {
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
- headerRightButtonWidth, headerButtonItemHeight));
-
- if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
- {
- __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f);
-
- __itemArea.width -= (headerRightButtonWidth);
- }
- else
- {
- __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
+ headerRightButtonWidth + 1, headerButtonItemHeight));
- __titleTextArea.width -= (headerRightButtonWidth);
-
- if (__style != TOOLBAR_TAB_WITH_TITLE)
- {
- __itemArea.width -= (headerRightButtonWidth);
- }
- }
+ if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
+ {
+ __itemArea.width -= (headerRightButtonWidth);
}
else
{
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
- headerRightButtonWidth, headerButtonItemHeight));
+ __titleTextArea.width -= (headerRightButtonWidth);
- if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
+ if (__style != TOOLBAR_TAB_WITH_TITLE)
{
- //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0, 0, 0, 0);
-
__itemArea.width -= (headerRightButtonWidth);
}
- else
- {
- //__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin);
-
- __titleTextArea.width -= (headerRightButtonWidth);
-
- if (__style != TOOLBAR_TAB_WITH_TITLE)
- {
- __itemArea.width -= (headerRightButtonWidth);
- }
- }
}
}
}
else if (__pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[LEFT_BUTTON]->GetText() == L"")
- {
- __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth, vmargin,
- headerLeftButtonWidth, headerButtonItemHeight));
-
- if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
- {
- __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, 0.0f, rightTouchMargin, 0.0f);
-
- __itemArea.width -= (headerLeftButtonWidth);
- }
- else
- {
- __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth, vmargin,
+ headerLeftButtonWidth + 1, headerButtonItemHeight));
- __titleTextArea.width -= (headerLeftButtonWidth);
-
- if (__style != TOOLBAR_TAB_WITH_TITLE)
- {
- __itemArea.width -= (headerLeftButtonWidth);
- }
- }
+ if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
+ {
+ __itemArea.width -= (headerLeftButtonWidth);
}
else
{
- __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth, vmargin,
- headerLeftButtonWidth, headerButtonItemHeight));
+ __titleTextArea.width -= (headerLeftButtonWidth);
- if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
+ if (__style != TOOLBAR_TAB_WITH_TITLE)
{
- //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0, 0, 0, 0);
-
__itemArea.width -= (headerLeftButtonWidth);
}
- else
- {
- //__pButtonItems[LEFT_BUTTON]->SetTouchMargin(0.0f, topTouchMargin, 0.0f, bottomTouchMargin);
-
- __titleTextArea.width -= (headerLeftButtonWidth);
-
- if (__style != TOOLBAR_TAB_WITH_TITLE)
- {
- __itemArea.width -= (headerLeftButtonWidth);
- }
- }
}
}
{
SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT,
(__pButtonItems[LEFT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2,
- topTouchMargin + (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - topTouchMargin - bottomTouchMargin - processingAnimationIconSize) / 2);
+ (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2);
}
if (__pButtonItems[RIGHT_BUTTON] && GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT) != ANIMATION_STOPPED)
{
SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT,
(__pButtonItems[RIGHT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2,
- topTouchMargin + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - topTouchMargin - bottomTouchMargin - processingAnimationIconSize) / 2);
+ (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2);
}
}
else // footer or edit or HEADER_STYLE_BUTTON // side align
float footerLeftMargin = 0.0f;
FloatDimension softkeyDimension(0.0f, 0.0f);
- float leftTouchMargin = 0.0f;
- float topTouchMargin = 0.0f;
- float rightTouchMargin = 0.0f;
- float bottomTouchMargin = 0.0f;
-
- if (__header == true && __style == TOOLBAR_TEXT) // sip
- {
- GET_SHAPE_CONFIG(HEADER::SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, GetOrientation(), leftTouchMargin);
- GET_SHAPE_CONFIG(HEADER::SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, GetOrientation(), topTouchMargin);
- GET_SHAPE_CONFIG(HEADER::SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, GetOrientation(), rightTouchMargin);
- GET_SHAPE_CONFIG(HEADER::SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, GetOrientation(), bottomTouchMargin);
- }
- else
- {
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_LEFT_TOUCH_MARGIN, GetOrientation(), leftTouchMargin);
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TOP_TOUCH_MARGIN, GetOrientation(), topTouchMargin);
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_RIGHT_TOUCH_MARGIN, GetOrientation(), rightTouchMargin);
- GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, GetOrientation(), bottomTouchMargin);
- }
-
if (__header == true && __style == TOOLBAR_TEXT)
{
GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH, GetOrientation(), footerButtonItemWidth);
{
if (__style != TOOLBAR_SOFTKEY)
{
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin,
- (__itemArea.height - footerButtonItemHeight) / 2, footerButtonItemWidth, footerButtonItemHeight));
+ __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth,
+ 0.0f, footerButtonItemWidth + 1, footerButtonItemHeight));
- __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, 0.0f,
footerButtonItemWidth, footerButtonItemHeight));
-
- __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
- __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
else
{
else
{
__pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - softkeyDimension.width, __itemArea.height - softkeyDimension.height,
- softkeyDimension.width, softkeyDimension.height));
+ softkeyDimension.width + 1, softkeyDimension.height));
}
if (__pButtonItems[LEFT_BUTTON]->GetText() == L"")
{
if (__style != TOOLBAR_SOFTKEY)
{
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin,
- (__itemArea.height - footerButtonItemHeight) / 2, footerButtonItemWidth, footerButtonItemHeight));
-
- __pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth,
+ 0.0f, footerButtonItemWidth + 1, footerButtonItemHeight));
}
else
{
else
{
__pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - softkeyDimension.width, __itemArea.height - softkeyDimension.height,
- softkeyDimension.width, softkeyDimension.height));
+ softkeyDimension.width + 1, softkeyDimension.height));
}
}
}
{
if (__style != TOOLBAR_SOFTKEY)
{
- __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, 0.0f,
footerButtonItemWidth, footerButtonItemHeight));
-
- __pButtonItems[LEFT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
else
{
{
__pButtonItems[LEFT_BUTTON]->AttachChild(*__pAnimation[animationPos]);
- float topTouchMargin = __pButtonItems[LEFT_BUTTON]->GetTopTouchMarginF();
- float bottomTouchMargin = __pButtonItems[LEFT_BUTTON]->GetBottomTouchMarginF();
-
SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT,
(__pButtonItems[LEFT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2,
- topTouchMargin + (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - topTouchMargin - bottomTouchMargin - processingAnimationIconSize) / 2);
+ (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2);
}
else if (animationPos == TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT)
{
__pButtonItems[RIGHT_BUTTON]->AttachChild(*__pAnimation[animationPos]);
- float topTouchMargin = __pButtonItems[RIGHT_BUTTON]->GetTopTouchMarginF();
- float bottomTouchMargin = __pButtonItems[RIGHT_BUTTON]->GetBottomTouchMarginF();
-
SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT,
(__pButtonItems[RIGHT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2,
- topTouchMargin + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - topTouchMargin - bottomTouchMargin - processingAnimationIconSize) / 2);
+ (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2);
}
_AccessibilityContainer* pContainer = __pAnimation[animationPos]->GetAccessibilityContainer();
if (pContainer)
{
FloatRectangle bounds = __pButtonItems[position]->GetBoundsF();
- float leftTouchMargin = __pButtonItems[position]->GetLeftTouchMarginF();
- float topTouchMargin = __pButtonItems[position]->GetTopTouchMarginF();
- float rightTouchMargin = __pButtonItems[position]->GetRightTouchMarginF();
- float bottomTouchMargin = __pButtonItems[position]->GetBottomTouchMarginF();
-
- bounds.x = bounds.x + leftTouchMargin;
- bounds.y = bounds.y + topTouchMargin;
- bounds.width = bounds.width - (leftTouchMargin + rightTouchMargin);
- bounds.height = bounds.height - (topTouchMargin + bottomTouchMargin);
-
return bounds;
}