_AccessibilityContainer* pContainer = GetAccessibilityContainer();
if (pContainer != null)
{
- pContainer->AddListener(*this);
-
+ float dateTimeDisplayBoxHeight = 0.0f;
+ float amPmDisplayBoxHeight = 0.0f;
+ float topMargin = 0.0f;
+ float leftMargin = 0.0f;
const _DateTimeDisplayBox* pBox = null;
const _DateTimeDisplayBox* pAmPmBox = null;
+ GET_SHAPE_CONFIG(DATETIMEPICKER::LEFT_MARGIN, GetOrientation(), leftMargin);
+
+ pContainer->AddListener(*this);
+
+ // Display Box
for (int index = 0; index < DATETIME_ID_MAX; index++)
{
pBox = __pPresenter->GetDisplayBox(index);
break;
}
+ GET_SHAPE_CONFIG(DATETIMEPICKER::DATETIME_DISPLAY_BOX_HEIGHT, GetOrientation(), dateTimeDisplayBoxHeight);
+ GET_SHAPE_CONFIG(DATETIMEPICKER::AMPM_DISPLAY_BOX_HEIGHT, GetOrientation(), amPmDisplayBoxHeight);
+ topMargin = (amPmDisplayBoxHeight - dateTimeDisplayBoxHeight) / 2.0f;
+
+ displayBoxBounds.x += leftMargin;
+ displayBoxBounds.y -= topMargin;
+ displayBoxBounds.height += 2 * topMargin;
+
if (__pDisplayVisualElement)
{
displayBoxBounds.y += __pDisplayVisualElement->GetBounds().y;
}
}
+ // AmPm Button
String hintAmPmText(L"Double tap to change");
pAmPmBox = __pPresenter->GetAmPmBox();
FloatRectangle amPmBoxBounds = pAmPmBox->GetDisplayBoxBounds();
+ amPmBoxBounds.x += leftMargin;
+
if (__pDisplayVisualElement)
{
amPmBoxBounds.y += __pDisplayVisualElement->GetBounds().y;