From 6647ef4d715d620925820053a67f87eea0b3e370 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Sat, 8 Jul 2000 18:27:44 +0000 Subject: [PATCH] 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. --- dlls/comctl32/toolbar.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 96811256e86..64880d3bef2 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -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)) { -- 2.11.4.GIT