FloatRectangle bounds = __pBaseIndexVe->GetBounds();
float indexHeight = GetIndexHeight();
FloatRectangle indexRect(bounds.x, __viewConfig.__indexMarginTop, bounds.width, indexHeight);
- int nonOmittedIndex = 0;
_AccessibilityElement* pAccessibilityElement = null;
result r = E_SUCCESS;
_FastScrollIndex* pChildIndex = __pBaseIndex->GetChildIndex(i, true);
SysTryReturnResult(NID_UI_CTRL, pChildIndex, GetLastResult(), "Failed to get the child index.");
- int omittedCount = 0;
if (pChildIndex->GetOmitted())
{
- omittedCount = pChildIndex->GetChildCount();
- pChildIndex = __pBaseIndex->GetChildIndex(nonOmittedIndex, false);
+ FloatPoint point((indexRect.x + indexRect.width/2), (indexRect.y + indexHeight/2));
+ pChildIndex = GetOmissionIndexAtPoint(pChildIndex, point);
SysTryReturnResult(NID_UI_CTRL, pChildIndex, GetLastResult(), "Failed to get the child index.");
}
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add accessibility element.", GetErrorMessage(r));
}
- if (omittedCount > 1)
- {
- omittedCount--;
- }
- else
- {
- indexRect.y += indexHeight;
- i++;
- }
-
- nonOmittedIndex++;
+ indexRect.y += indexHeight;
+ i++;
}
return E_SUCCESS;
}
else
{
- if (selectedIndexOrder == 0)
+ selectedRect.y = ((selectedIndexOrder * indexHeight) + __viewConfig.__indexMarginTop);
+ if (indexHeight < __viewConfig.__selectedIndexHeight)
{
- selectedRect.y = 0.0f;
- selectedRect.height = indexHeight + __viewConfig.__indexMarginTop;
- }
- else if (selectedIndexOrder == childCount - 1)
- {
- selectedRect.y = ((selectedIndexOrder * indexHeight) + __viewConfig.__indexMarginTop);
- selectedRect.height = bounds.height - selectedRect.y;
+ selectedRect.y -= ((__viewConfig.__selectedIndexHeight - indexHeight) / 2.0f);
}
else
{
- selectedRect.y = ((selectedIndexOrder * indexHeight) + __viewConfig.__indexMarginTop);
- if (indexHeight < __viewConfig.__selectedIndexHeight)
- {
- selectedRect.y -= ((__viewConfig.__selectedIndexHeight - indexHeight) / 2.0f);
- }
- else
- {
- selectedRect.height = indexHeight;
- }
+ selectedRect.height = indexHeight;
+ }
- if (selectedRect.y < 0.0f)
- {
- selectedRect.y = 0.0f;
- }
+ if (selectedRect.y < 0.0f)
+ {
+ selectedRect.y = 0.0f;
}
}
FloatRectangle bounds = __pSelectedIndexVe->GetBounds();
FloatRectangle outlineBounds = __pSelectedBgVe->GetBounds();
- int childCount = __pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType());
- int selectedIndexOrder = GetSelectedIndexOrder();
-
pCanvas->SetLineWidth(__viewConfig.__indexLeftLineThickness);
pCanvas->SetForegroundColor(__viewConfig.__indexSelectedLineColor);
- if (selectedIndexOrder == 0)
- {
- pCanvas->DrawLine(FloatPoint(0.0f, outlineBounds.height), FloatPoint(outlineBounds.width, outlineBounds.height));
- pCanvas->DrawLine(FloatPoint(outlineBounds.width, outlineBounds.y), FloatPoint(outlineBounds.width, outlineBounds.height));
-
- pCanvas->DrawLine(FloatPoint(1.0f, outlineBounds.height), FloatPoint(1.0f, bounds.height));
- }
- else if (selectedIndexOrder == childCount - 1)
- {
- pCanvas->DrawLine(FloatPoint(0.0f, outlineBounds.y), FloatPoint(outlineBounds.width, outlineBounds.y));
- pCanvas->DrawLine(FloatPoint(outlineBounds.width, outlineBounds.y), FloatPoint(outlineBounds.width, bounds.height));
-
- pCanvas->DrawLine(FloatPoint(1.0f, 0.0f), FloatPoint(1.0f, outlineBounds.y));
- }
- else if (__viewConfig.__pSelectedIndexlineBitmap)
+ if (__viewConfig.__pSelectedIndexlineBitmap)
{
Bitmap* pReplacementColorBackgroundBitmap = null;
pReplacementColorBackgroundBitmap =