{
result r = E_SUCCESS;
bool isCustomBitmap = false;
+ _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
+
+ FloatDimension rightLeftArrowIconSize;
+ GET_DIMENSION_CONFIG(COLORPICKER::ARROW_BUTTON_ARROW_ICON_SIZE, orientation, rightLeftArrowIconSize);
+
+ FloatRectangle rightLeftArrowIconBounds;
+ rightLeftArrowIconBounds.x = rcButton.x + (rcButton.width - rightLeftArrowIconSize.width) / 2.0f;
+ rightLeftArrowIconBounds.y = rcButton.y + (rcButton.height - rightLeftArrowIconSize.height) / 2.0f;
+ rightLeftArrowIconBounds.width = rightLeftArrowIconSize.width;
+ rightLeftArrowIconBounds.height = rightLeftArrowIconSize.height;
+
if (__pColorPicker->IsEnabled() == false)
{
if (drawLeftButton)
{
- r = DrawResourceBitmap(canvas, rcButton, __pLeftArrowDisabledBitmap);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowDisabledBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- r = DrawResourceBitmap(canvas, rcButton, __pRightArrowDisabledBitmap);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowDisabledBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
if (drawLeftButton)
{
- r = DrawResourceBitmap(canvas, rcButton, __pLeftArrowPressedBitmap);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowPressedBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- r = DrawResourceBitmap(canvas, rcButton, __pRightArrowPressedBitmap);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowPressedBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
if (drawLeftButton)
{
- r = DrawResourceBitmap(canvas, rcButton, __pLeftArrowNormalBitmap);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowNormalBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- r = DrawResourceBitmap(canvas, rcButton, __pRightArrowNormalBitmap);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowNormalBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
DECLARE_IMAGE_CONFIG(BAR_BG_LANDSCAPE_NORMAL, 21);
//Dimension config
DECLARE_DIMENSION_CONFIG(DEFAULT_SIZE, 1);
+ DECLARE_DIMENSION_CONFIG(ARROW_BUTTON_ARROW_ICON_SIZE, 2);
//Shape config
DECLARE_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 1);
DECLARE_SHAPE_CONFIG(ARROW_BUTON_TOP_MARGIN, 2);
DECLARE_FIXED_VALUE_CONFIG(BLOCK_MARGIN, 1);
DECLARE_END_UI_CONFIG(COLORPICKER);
-#endif //_FUI_RESOURCE_COLORPICKER_CONFIG_H_
\ No newline at end of file
+#endif //_FUI_RESOURCE_COLORPICKER_CONFIG_H_