Skip to content
Snippets Groups Projects
Commit 6647ef4d authored by Chris Morgan's avatar Chris Morgan Committed by Alexandre Julliard
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment