diff --git a/dll/win32/comctl32/button.c b/dll/win32/comctl32/button.c index ea250e84062..a62ef6e789c 100644 --- a/dll/win32/comctl32/button.c +++ b/dll/win32/comctl32/button.c @@ -420,16 +420,21 @@ BOOL BUTTON_DrawIml(HDC hDC, BUTTON_IMAGELIST *pimlData, RECT *prc, BOOL bOnlyCa } else if (pimlData->uAlign == BUTTON_IMAGELIST_ALIGN_TOP) { - left = prc->left + (prc->right - prc->left - ImageSize.cy) / 2; + left = prc->left + (prc->right - prc->left - ImageSize.cx) / 2; top = prc->top + pimlData->margin.top; prc->top = top + ImageSize.cy + pimlData->margin.bottom; } else if (pimlData->uAlign == BUTTON_IMAGELIST_ALIGN_BOTTOM) { - left = prc->left + (prc->right - prc->left - ImageSize.cy) / 2; + left = prc->left + (prc->right - prc->left - ImageSize.cx) / 2; top = prc->bottom - pimlData->margin.bottom - ImageSize.cy; prc->bottom = top - pimlData->margin.top; } + else if (pimlData->uAlign == BUTTON_IMAGELIST_ALIGN_CENTER) + { + left = prc->left + (prc->right - prc->left - ImageSize.cx) / 2; + top = prc->top + (prc->bottom - prc->top - ImageSize.cy) / 2; + } if (!bOnlyCalc) ImageList_Draw(pimlData->himl, 0, hDC, left, top, 0);