SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
- if (pCanvas != null)
- {
- r = pCanvas->Construct(bounds);
- pCanvas->SetBackgroundColor(canvasBackgroundColor);
- pCanvas->Clear();
- DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBoxBg), *pCheckBoxBg);
+ r = pCanvas->Construct(bounds);
+ pCanvas->SetBackgroundColor(Color(canvasBackgroundColor.GetRed(), canvasBackgroundColor.GetGreen(), canvasBackgroundColor.GetBlue(), 0));
+ pCanvas->Clear();
- __checkedBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBox);
- if (IsChecked() == true)
+ DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBoxBg), *pCheckBoxBg);
+
+ __checkedBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBox);
+ if (IsChecked() == true)
+ {
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pCheckBox))
{
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pCheckBox))
- {
- FloatRectangle drawingRect(__checkedBounds.x, __checkedBounds.y, __checkedBounds.width, __checkedBounds.height);
- r = pCanvas->DrawNinePatchedBitmap(_CoordinateSystemUtils::ConvertToInteger(drawingRect), *pCheckBox); // +++ check floating
- }
- else
- {
- FloatRectangle bitmapSourceRect(0.0f, 0.0f, pCheckBox->GetWidthF()*__checkedCount * 0.1, pCheckBox->GetHeightF());
- FloatRectangle drawingRect(__checkedBounds.x, __checkedBounds.y, __checkedBounds.width * __checkedCount * 0.1, __checkedBounds.height);
- r = pCanvas->DrawBitmap(_CoordinateSystemUtils::ConvertToInteger(drawingRect), *pCheckBox, _CoordinateSystemUtils::ConvertToInteger(bitmapSourceRect)); // +++ check floating
- }
+ FloatRectangle drawingRect(__checkedBounds.x, __checkedBounds.y, __checkedBounds.width, __checkedBounds.height);
+ r = pCanvas->DrawNinePatchedBitmap(_CoordinateSystemUtils::ConvertToInteger(drawingRect), *pCheckBox); // +++ check floating
+ }
+ else
+ {
+ FloatRectangle bitmapSourceRect(0.0f, 0.0f, pCheckBox->GetWidthF()*__checkedCount * 0.1, pCheckBox->GetHeightF());
+ FloatRectangle drawingRect(__checkedBounds.x, __checkedBounds.y, __checkedBounds.width * __checkedCount * 0.1, __checkedBounds.height);
+ r = pCanvas->DrawBitmap(_CoordinateSystemUtils::ConvertToInteger(drawingRect), *pCheckBox, _CoordinateSystemUtils::ConvertToInteger(bitmapSourceRect)); // +++ check floating
}
}
pMergeBitmap = new (std::nothrow) Bitmap();
SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- if (pMergeBitmap != null)
- {
- pMergeBitmap->Construct(*pCanvas, bounds);
- }
+ pMergeBitmap->Construct(*pCanvas, bounds);
- if (__pItemAnnex == null)
+ if(__pItemAnnex)
{
- __pItemAnnex = _Label::CreateLabelN();
-
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, __pItemAnnex != null, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- float leftMargin = 0.0f;
- GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin);
-
- float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height);
-
- __pItemAnnex->SetBounds(FloatRectangle(leftMargin, ((itemHeight - annexHeight) / 2), annexWidth, annexHeight));
- __pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0));
-
- AttachSystemChild(*__pItemAnnex);
+ __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
+ __pItemAnnex->Invalidate();
}
- __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
- __pItemAnnex->Invalidate();
-
CATCH:
delete pCheckBox;
delete pCheckBoxBg;
SetBackgroundColor(Color(0, 0, 0, 0));
__pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f));
}
+ else if(__itemType == TABLE_VIEW_ITEM_TYPE_TITLE)
+ {
+ Color titleColor;
+ if((__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) || (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED))
+ {
+ GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_BG_PRESSED, titleColor);
+ }
+ else
+ {
+ GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_BG_NORMAL, titleColor);
+ }
+
+ __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)titleColor.GetRed() / 255.0f, (float)titleColor.GetGreen() / 255.0f, (float)titleColor.GetBlue() / 255.0f, (float)titleColor.GetAlpha() / 255.0f));
+ }
else
{
SetBackgroundColor(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]);
+
__pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
if (__pDrawingProperty->groupedLookEnabled == true)
{
Canvas* pCanvas = null;
Bitmap* pSectionBg = null;
- Bitmap* pSectionPressedBg = null;
+ Bitmap* pReplacementSectionPressBg = null;
Bitmap* pReplacementSectionBg = null;
Color bgColor = __colorItemBg[__drawingStatus];
FloatRectangle bounds = GetBoundsF();
Color pressColor;
GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_PRESSED, pressColor);
- if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
- {
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressedBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
- }
- else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
- {
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressedBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
- }
- else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
- {
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressedBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
- }
- else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
- {
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressedBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
- }
+ pReplacementSectionPressBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), pressColor);
- pSectionPressedBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), pressColor);
GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, dividerHeight);
- DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height-dividerHeight * 2), *pSectionPressedBg);
+ DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height - dividerHeight * 2), *pReplacementSectionPressBg);
}
else
{
CATCH:
delete pSectionBg;
- delete pSectionPressedBg;
+ delete pReplacementSectionPressBg;
delete pReplacementSectionBg;
delete pCanvas;
}
void
_TableViewItem::DrawSectionStyleBackgroundCover(void)
{
- Bitmap* pSectionBgCover = null;
+ Bitmap* pSectionBgCoverEf = null;
+ Bitmap* pReplacementSectionBgEf = null;
Bitmap* pReplacementSectionBg = null;
+ Bitmap* pSectionBgCoverBg = null;
+ Bitmap* pMergeBitmap = null;
+ Canvas* pCanvas = null;
if (__pDrawingProperty->sectionStyleEnabled == true)
{
FloatRectangle bounds = GetBoundsF();
if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCover);
+ r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf);
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCover);
+ r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf);
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCover);
+ r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf);
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCover);
+ r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf);
+ }
+ else
+ {
+ r = E_SYSTEM;
+ }
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+
+ if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
+ {
+ r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg);
+ }
+ else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
+ {
+ r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg);
+ }
+ else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
+ {
+ r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg);
+ }
+ else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
+ {
+ r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg);
}
else
{
__pItemCover->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
+ Color bgColor;
+
if (__enabledState)
{
_TableView* pParent = dynamic_cast<_TableView*>(GetParent());
if (pParent == null)
{
- delete pSectionBgCover;
+ delete pSectionBgCoverEf;
return;
}
- pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBgCover, Color::GetColor(COLOR_ID_MAGENTA), pParent->GetBackgroundColor());
- __pItemCover->SetBackgroundBitmap(*pReplacementSectionBg);
+
+ bgColor = pParent->GetBackgroundColor();
}
else
{
- Color bgColor;
GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor);
- pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBgCover, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
- __pItemCover->SetBackgroundBitmap(*pReplacementSectionBg);
}
+ pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBgCoverBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
+ pReplacementSectionBgEf = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBgCoverEf, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
+
+ pCanvas = new (std::nothrow) Canvas();
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+
+ pCanvas->Construct(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
+ pCanvas->SetBackgroundColor(Color(bgColor.GetRed(), bgColor.GetGreen(), bgColor.GetBlue(), 0));
+ pCanvas->Clear();
+
+ DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg);
+ DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBgEf);
+
+ pMergeBitmap = new (std::nothrow) Bitmap();
+ SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+
+ pMergeBitmap->Construct(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
+
+ __pItemCover->SetBackgroundBitmap(*pMergeBitmap);
+
if (__pDrawingProperty->groupedLookEnabled == true)
{
__pItemCover->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
}
CATCH:
- delete pSectionBgCover;
+ delete pSectionBgCoverEf;
+ delete pReplacementSectionBgEf;
delete pReplacementSectionBg;
+ delete pSectionBgCoverBg;
+ delete pCanvas;
+ delete pMergeBitmap;
}
void
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
- if (pCanvas != null)
- {
- pCanvas->Construct(bounds);
- pCanvas->SetBackgroundColor(canvasBackgroundColor);
- pCanvas->Clear();
- DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBoxBg), *pCheckBoxBg);
+ pCanvas->Construct(bounds);
+ pCanvas->SetBackgroundColor(Color(canvasBackgroundColor.GetRed(), canvasBackgroundColor.GetGreen(), canvasBackgroundColor.GetBlue(), 0));
+ pCanvas->Clear();
- if (__isCheckedAnimationEnabled == true)
- {
- StartCheckBoxAnimation();
- }
- else
+ DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBoxBg), *pCheckBoxBg);
+
+ if (__isCheckedAnimationEnabled == true)
+ {
+ StartCheckBoxAnimation();
+ }
+ else
+ {
+ if (IsChecked() == true && pCheckBox != null)
{
- if (IsChecked() == true && pCheckBox != null)
- {
- DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBox), *pCheckBox);
- }
+ DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBox), *pCheckBox);
}
}
pMergeBitmap = new (std::nothrow) Bitmap();
SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- if (pMergeBitmap != null)
- {
- pMergeBitmap->Construct(*pCanvas, bounds);
- }
+ pMergeBitmap->Construct(*pCanvas, bounds);
__pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
__pItemAnnex->Invalidate();
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
- if (pCanvas != null)
- {
- pCanvas->Construct(bounds);
- pCanvas->SetBackgroundColor(canvasBackgroundColor);
- pCanvas->Clear();
- DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pRadioButtonBg), *pRadioButtonBg);
+ pCanvas->Construct(bounds);
+ pCanvas->SetBackgroundColor(Color(canvasBackgroundColor.GetRed(), canvasBackgroundColor.GetGreen(), canvasBackgroundColor.GetBlue(), 0));
+ pCanvas->Clear();
- if (pRadioButton != null && IsChecked() == true)
- {
- DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pRadioButton), *pRadioButton);
- }
+ DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pRadioButtonBg), *pRadioButtonBg);
+
+ if (pRadioButton != null && IsChecked() == true)
+ {
+ DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pRadioButton), *pRadioButton);
}
pMergeBitmap = new (std::nothrow) Bitmap();
SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- if (pMergeBitmap != null)
- {
- pMergeBitmap->Construct(*pCanvas, bounds);
- }
+ pMergeBitmap->Construct(*pCanvas, bounds);
__pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
__pItemAnnex->Invalidate();
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
+
pCanvas->Construct(bounds);
- pCanvas->SetBackgroundColor(canvasBackgroundColor);
+ pCanvas->SetBackgroundColor(Color(canvasBackgroundColor.GetRed(), canvasBackgroundColor.GetGreen(), canvasBackgroundColor.GetBlue(), 0));
pCanvas->Clear();
backgroundBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pOnOffButton);
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
+
pCanvas->Construct(bounds);
- pCanvas->SetBackgroundColor(canvasBackgroundColor);
+ pCanvas->SetBackgroundColor(Color(canvasBackgroundColor.GetRed(), canvasBackgroundColor.GetGreen(), canvasBackgroundColor.GetBlue(), 0));
pCanvas->Clear();
backgroundBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pOnOffButton);
{
handlerBounds.x = backgroundBounds.x + annexMargin;
}
- }
-
- DrawBitmap(*pCanvas, handlerBounds, *pOnOffButtonHandler);
-
- pMergeBitmap = new (std::nothrow) Bitmap();
- SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
-
- pMergeBitmap->Construct(*pCanvas, bounds);
- if (__pItemAnnex == null)
- {
- __pItemAnnex = _Label::CreateLabelN();
- SysTryReturnVoidResult(NID_UI_CTRL, __pItemAnnex, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- float leftMargin = 0.0f;
- GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin);
+ DrawBitmap(*pCanvas, handlerBounds, *pOnOffButtonHandler);
- leftMargin += __pDrawingProperty->scrollMargin;
+ pMergeBitmap = new (std::nothrow) Bitmap();
+ SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height); // +++ check floating
- __pItemAnnex->SetBounds(FloatRectangle((GetBoundsF().width - annexWidth - leftMargin), ((itemHeight - annexHeight) / 2), annexWidth, annexHeight));
- __pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0));
+ pMergeBitmap->Construct(*pCanvas, bounds);
- AttachSystemChild(*__pItemAnnex);
+ __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
+ __pItemAnnex->Invalidate();
}
- __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
- __pItemAnnex->Invalidate();
-
CATCH:
delete pOnOffButton;
delete pOnOffButtonHandler;
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
+
pCanvas->Construct(bounds);
- pCanvas->SetBackgroundColor(canvasBackgroundColor);
+ pCanvas->SetBackgroundColor(Color(canvasBackgroundColor.GetRed(), canvasBackgroundColor.GetGreen(), canvasBackgroundColor.GetBlue(), 0));
pCanvas->Clear();
DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pReplacementDetailBg), *pReplacementDetailBg);
GetItemIndex(groupIndex, itemIndex);
if (itemIndex < 1)
{
- __pItemTopDivider->SetVisibleState(false);
+ if(__pItemTopDivider)
+ {
+ __pItemTopDivider->SetVisibleState(false);
+ }
}
GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_TOP_BG_NORMAL, dividerColor);
if (__pItemDivider != null )
{
- if(__pItemDivider->GetVisibleState())
+ if(__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
{
- __pItemDivider->SetBounds(dividerBottomBounds);
- __pItemDivider->SetBackgroundColor(underLineColor);
- __pItemDivider->Invalidate();
+ __pItemDivider->SetVisibleState(false);
+ }
+ else
+ {
+ if(__pItemDivider->GetVisibleState())
+ {
+ __pItemDivider->SetBounds(dividerBottomBounds);
+ __pItemDivider->SetBackgroundColor(underLineColor);
+ __pItemDivider->Invalidate();
+ }
}
_AccessibilityContainer* pContainer = __pItemDivider->GetAccessibilityContainer();
}
else
{
- Color dividerColor;
+ Color dividerLeftColor;
+ Color dividerRightColor;
FloatRectangle bounds = GetBoundsF();
float dividerHeight = 0;
float itemHeight = 0;
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, itemLeftMargin);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexLeftMargin);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_TOP_BG_NORMAL, dividerColor);
+ GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL, dividerLeftColor);
+ GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL, dividerRightColor);
GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, dividerWidth);
GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, dividerTopMargin);
dividerHeight = itemHeight - (dividerTopMargin*2);
dividerHeight = (dividerHeight > 0) ? dividerHeight : 0;
__pItemAnnexLeftDivider->SetBounds(FloatRectangle((GetBoundsF().width - annexWidth - (itemLeftMargin + annexLeftMargin) - (dividerWidth*2)), dividerTopMargin, dividerWidth, dividerHeight));
- __pItemAnnexLeftDivider->SetBackgroundColor(__pDrawingProperty->dividerColor);
+ __pItemAnnexLeftDivider->SetBackgroundColor(dividerLeftColor);
__pItemAnnexLeftDivider->Invalidate();
__pItemAnnexRightDivider->SetBounds(FloatRectangle((GetBoundsF().width - annexWidth - (itemLeftMargin + annexLeftMargin) - dividerWidth), dividerTopMargin, dividerWidth, dividerHeight));
- __pItemAnnexRightDivider->SetBackgroundColor(dividerColor);
+ __pItemAnnexRightDivider->SetBackgroundColor(dividerRightColor);
__pItemAnnexRightDivider->Invalidate();
}
result
_TableViewItem::SetItemHighlightBounds(_VisualElement& highlightVisualElement, const FloatRectangle& bounds)
{
-// FloatRectangle veBounds(bounds.x, bounds.y, bounds.width, bounds.height);
return highlightVisualElement.SetBounds(bounds);
}
_VisualElement* pVisualElement = GetVisualElement();
VisualElementValueAnimation* pAnimation = null;
String animationName = L"MOVE_ITEM";
+ FloatPoint itemPosition = GetPositionF();
result r = E_SUCCESS;
+ if (position == itemPosition)
+ {
+ return false;
+ }
+
if (__pMoveItemAnimation == null)
{
__pMoveItemAnimation = new (std::nothrow) VisualElementValueAnimation;