[COMCTL32] Fix regression CORE-14649

Fixes a regression that was introduced by Wine Staging 3.3 Sync.
Symptom was missing button text and icons for specific buttons
in Delphi applications, e.g. Double-Commander, Lazarus, Peazip.
The patch restores and ifdef-guards previous changes of Giannis.
This commit is contained in:
Joachim Henze 2018-06-02 12:26:48 +02:00
parent e3905cc68a
commit 16d6c9b5e0

View file

@ -1177,7 +1177,7 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
UINT dtStyle = BUTTON_BStoDT( style, ex_style );
RECT r = *rc;
INT n;
#ifdef __REACTOS__
#if !defined(_USER32_) && defined(__REACTOS__)
BOOL bHasIml = BUTTON_DrawIml(hdc, &infoPtr->imlData, &r, TRUE, 0);
#endif
@ -1229,12 +1229,16 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
default:
empty_rect:
#if !defined(_USER32_) && defined(__REACTOS__)
if (bHasIml)
break;
#endif
rc->right = r.left;
rc->bottom = r.top;
return (UINT)-1;
}
#ifdef __REACTOS__
#if !defined(_USER32_) && defined(__REACTOS__)
if (bHasIml)
{
if (infoPtr->imlData.uAlign == BUTTON_IMAGELIST_ALIGN_LEFT)
@ -1318,7 +1322,7 @@ static void BUTTON_DrawLabel(const BUTTON_INFO *infoPtr, HDC hdc, UINT dtFlags,
* I don't have Win31 on hand to verify that, so I leave it as is.
*/
#ifdef __REACTOS__
#if !defined(_USER32_) && defined(__REACTOS__)
RECT rcText = *rc;
BUTTON_DrawIml(hdc, &infoPtr->imlData, &rcText, FALSE, 0);
#endif