Button width should be the larger of text width/bitmap width.

This commit is contained in:
Duane Clark 2003-08-27 23:11:35 +00:00 committed by Alexandre Julliard
parent 8d5e732186
commit 78cd28793a
1 changed files with 7 additions and 3 deletions

View File

@ -1443,9 +1443,13 @@ TOOLBAR_CalcToolbar (HWND hwnd)
/* Fudge amount measured against IE4 "menu" and "Links" */
/* toolbars with native control (v4.71). - GA 8/01 */
cx = sz.cx + 6 + 5 + 5;
if ((dwStyle & TBSTYLE_LIST) &&
(TOOLBAR_TestImageExist (infoPtr, btnPtr, GETDEFIMAGELIST(infoPtr,0))))
cx += infoPtr->nBitmapWidth;
if (TOOLBAR_TestImageExist (infoPtr, btnPtr, GETDEFIMAGELIST(infoPtr,0)))
{
if (dwStyle & TBSTYLE_LIST)
cx += infoPtr->nBitmapWidth;
else if (cx < (infoPtr->nBitmapWidth+7))
cx = infoPtr->nBitmapWidth+7;
}
}
else
cx = infoPtr->nButtonWidth;