comctl32: toolbar: Use the width of the current button instead of nButtonWidth to position the icon.

This commit is contained in:
Mikołaj Zalewski 2006-11-01 23:38:30 +01:00 committed by Alexandre Julliard
parent 420f7cb076
commit 0559afda80
1 changed files with 1 additions and 1 deletions

View File

@ -896,7 +896,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr
rcBitmap.left += GetSystemMetrics(SM_CXEDGE) + infoPtr->iListGap / 2;
}
else
rcBitmap.left += (infoPtr->nButtonWidth - infoPtr->nBitmapWidth) / 2;
rcBitmap.left += ((rc.right - rc.left) - infoPtr->nBitmapWidth) / 2;
rcBitmap.top += infoPtr->szPadding.cy / 2;