if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK) || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO))
{
- if (GetLabelCore(__pItemAnnex) == &child)
+ if (GetLabelCore(__pItemAnnex) == &child ||
+ GetLabelCore(__pSimpleItemBitmap) == &child ||
+ GetLabelCore(__pSimpleItemText) == &child)
{
return;
}
float annexMargin = 0.0f;
float elementWidth = 0;
float elementHeight = 0;
- float itemHeight = __itemHeight;
+ float itemHeight = GetBoundsF().height;
+ float itemWidth = GetBoundsF().width;
float annexWidth = GetAnnexWidth(__annexStyle);
if (groupType)
bitmapRect.height = elementHeight;
}
- textRect.x = bitmapRect.x + elementWidth + leftMargin;
-
- if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK || __annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO)
- {
- GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexMargin);
- textRect.x = bitmapRect.x + elementWidth + annexMargin;
- }
-
- if (annexWidth > 0) // +++ check floating
+ if(__annexStyle == TABLE_VIEW_ANNEX_STYLE_NORMAL)
{
- elementWidth = __itemWidth - textRect.x - annexWidth - leftMargin;
+ textRect.x = bitmapRect.x + elementWidth + leftMargin;
+ elementWidth = itemWidth - textRect.x - leftMargin;
}
else
{
- elementWidth = __itemWidth - textRect.x;
+ GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexMargin);
+ if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK || __annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO)
+ {
+ bitmapRect.x = leftMargin + annexWidth + annexMargin;
+ textRect.x = bitmapRect.x + elementWidth + leftMargin;
+ elementWidth = itemWidth - textRect.x - leftMargin;
+ }
+ else
+ {
+ textRect.x = bitmapRect.x + elementWidth + leftMargin;
+ elementWidth = itemWidth - textRect.x - annexWidth - leftMargin - annexMargin;
+ }
}
textRect.y = 0.0f;
- textRect.width = elementWidth;
+ textRect.width = elementWidth < 0 ? 0 : elementWidth;;
textRect.height = itemHeight;
if (__pSimpleItemBitmap != null && pBitmap != null)