Commit 6647ef4d authored by Chris Morgan's avatar Chris Morgan Committed by Alexandre Julliard

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.
parent e6dd5d1c
...@@ -75,8 +75,9 @@ TOOLBAR_DrawFlatSeparator (LPRECT lpRect, HDC hdc) ...@@ -75,8 +75,9 @@ TOOLBAR_DrawFlatSeparator (LPRECT lpRect, HDC hdc)
/* /*
* Draw the text string for this button. * Draw the text string for this button.
* note: himl is not used, except to determine whether this button has * note: himl is not used, except to determine whether this button has
* an associated bitmap. If so, the text is drawn below it, otherwise * an associated bitmap. If himl and infoPtr->himlDef are non-zero
* the text is drawn within the rectangle of the button itself. * the text is drawn below it, otherwise the text is drawn within
* the rectangle of the button itself.
*/ */
static void static void
TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
...@@ -105,7 +106,8 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, ...@@ -105,7 +106,8 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
InflateRect (&rcText, -3, -3); InflateRect (&rcText, -3, -3);
if (himl && TOOLBAR_IsValidBitmapIndex(infoPtr,btnPtr->iBitmap)) { if ((himl || infoPtr->himlDef) &&
TOOLBAR_IsValidBitmapIndex(infoPtr,btnPtr->iBitmap)) {
if ((dwStyle & TBSTYLE_LIST) && if ((dwStyle & TBSTYLE_LIST) &&
((btnPtr->fsStyle & TBSTYLE_AUTOSIZE) == 0) && ((btnPtr->fsStyle & TBSTYLE_AUTOSIZE) == 0) &&
(btnPtr->iBitmap != I_IMAGENONE)) { (btnPtr->iBitmap != I_IMAGENONE)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment