Don't add extra OFFSET_X/Y to the calculation of rcBitmap.top/left,
just use GetSystemMetrics.
This commit is contained in:
parent
9c26e5ba21
commit
c0a142ccee
|
@ -868,12 +868,12 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
|
||||||
|
|
||||||
/* Center the bitmap horizontally and vertically */
|
/* Center the bitmap horizontally and vertically */
|
||||||
if (dwStyle & TBSTYLE_LIST)
|
if (dwStyle & TBSTYLE_LIST)
|
||||||
rcBitmap.left += GetSystemMetrics(SM_CXEDGE) + OFFSET_X;
|
rcBitmap.left += GetSystemMetrics(SM_CXEDGE);
|
||||||
else
|
else
|
||||||
rcBitmap.left+=(infoPtr->nButtonWidth - infoPtr->nBitmapWidth) / 2;
|
rcBitmap.left+=(infoPtr->nButtonWidth - infoPtr->nBitmapWidth) / 2;
|
||||||
|
|
||||||
if(lpText)
|
if(lpText)
|
||||||
rcBitmap.top+= GetSystemMetrics(SM_CYEDGE) + OFFSET_Y;
|
rcBitmap.top+= GetSystemMetrics(SM_CYEDGE);
|
||||||
else
|
else
|
||||||
rcBitmap.top+=(infoPtr->nButtonHeight - infoPtr->nBitmapHeight) / 2;
|
rcBitmap.top+=(infoPtr->nButtonHeight - infoPtr->nBitmapHeight) / 2;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue