comctl32: toolbar: The string should be included in the height of a button-less toolbar only if there is a string in the pool.

This commit is contained in:
Mikołaj Zalewski 2006-11-01 22:47:20 +01:00 committed by Alexandre Julliard
parent d57a61f831
commit 9ec280c258
1 changed files with 3 additions and 6 deletions

View File

@ -1226,7 +1226,7 @@ TOOLBAR_CalcStrings (HWND hwnd, LPSIZE lpSize)
hdc = GetDC (hwnd); hdc = GetDC (hwnd);
hOldFont = SelectObject (hdc, infoPtr->hFont); hOldFont = SelectObject (hdc, infoPtr->hFont);
if (infoPtr->nNumButtons == 0) if (infoPtr->nNumButtons == 0 && infoPtr->nNumStrings > 0)
{ {
TEXTMETRICW tm; TEXTMETRICW tm;
@ -3460,11 +3460,8 @@ TOOLBAR_GetButtonSize (HWND hwnd)
{ {
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
if (infoPtr->nNumButtons > 0)
return MAKELONG((WORD)infoPtr->nButtonWidth, return MAKELONG((WORD)infoPtr->nButtonWidth,
(WORD)infoPtr->nButtonHeight); (WORD)infoPtr->nButtonHeight);
else
return MAKELONG(23,22);
} }