Skip to content

Commit 4268605

Browse files
committed
[0.4.9] cherry-pick [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. (cherry picked from commit 16d6c9b)
1 parent 98e87bc commit 4268605

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dll/win32/comctl32/button.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
11771177
UINT dtStyle = BUTTON_BStoDT( style, ex_style );
11781178
RECT r = *rc;
11791179
INT n;
1180-
#ifdef __REACTOS__
1180+
#if !defined(_USER32_) && defined(__REACTOS__)
11811181
BOOL bHasIml = BUTTON_DrawIml(hdc, &infoPtr->imlData, &r, TRUE, 0);
11821182
#endif
11831183

@@ -1229,12 +1229,16 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
12291229

12301230
default:
12311231
empty_rect:
1232+
#if !defined(_USER32_) && defined(__REACTOS__)
1233+
if (bHasIml)
1234+
break;
1235+
#endif
12321236
rc->right = r.left;
12331237
rc->bottom = r.top;
12341238
return (UINT)-1;
12351239
}
12361240

1237-
#ifdef __REACTOS__
1241+
#if !defined(_USER32_) && defined(__REACTOS__)
12381242
if (bHasIml)
12391243
{
12401244
if (infoPtr->imlData.uAlign == BUTTON_IMAGELIST_ALIGN_LEFT)
@@ -1318,7 +1322,7 @@ static void BUTTON_DrawLabel(const BUTTON_INFO *infoPtr, HDC hdc, UINT dtFlags,
13181322
* I don't have Win31 on hand to verify that, so I leave it as is.
13191323
*/
13201324

1321-
#ifdef __REACTOS__
1325+
#if !defined(_USER32_) && defined(__REACTOS__)
13221326
RECT rcText = *rc;
13231327
BUTTON_DrawIml(hdc, &infoPtr->imlData, &rcText, FALSE, 0);
13241328
#endif

0 commit comments

Comments
 (0)