Fixed TOOLBAR_DrawString() to offset button text if the himl parameter

is non-zero or the default himl, himlDef, is non-zero.  Fixes a bug in
WinZip 8.0 where text is not shifted down by the height of the button
image.
This commit is contained in:
Chris Morgan 2000-07-08 18:27:44 +00:00 committed by Alexandre Julliard
parent e6dd5d1cad
commit 6647ef4d71

View file

@ -75,8 +75,9 @@ TOOLBAR_DrawFlatSeparator (LPRECT lpRect, HDC hdc)
/*
* Draw the text string for this button.
* note: himl is not used, except to determine whether this button has
* an associated bitmap. If so, the text is drawn below it, otherwise
* the text is drawn within the rectangle of the button itself.
* an associated bitmap. If himl and infoPtr->himlDef are non-zero
* the text is drawn below it, otherwise the text is drawn within
* the rectangle of the button itself.
*/
static void
TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
@ -105,7 +106,8 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
InflateRect (&rcText, -3, -3);
if (himl && TOOLBAR_IsValidBitmapIndex(infoPtr,btnPtr->iBitmap)) {
if ((himl || infoPtr->himlDef) &&
TOOLBAR_IsValidBitmapIndex(infoPtr,btnPtr->iBitmap)) {
if ((dwStyle & TBSTYLE_LIST) &&
((btnPtr->fsStyle & TBSTYLE_AUTOSIZE) == 0) &&
(btnPtr->iBitmap != I_IMAGENONE)) {