mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[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 16d6c9b5e0
)
This commit is contained in:
parent
98e87bcafd
commit
4268605cb9
1 changed files with 7 additions and 3 deletions
|
@ -1177,7 +1177,7 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
|
||||||
UINT dtStyle = BUTTON_BStoDT( style, ex_style );
|
UINT dtStyle = BUTTON_BStoDT( style, ex_style );
|
||||||
RECT r = *rc;
|
RECT r = *rc;
|
||||||
INT n;
|
INT n;
|
||||||
#ifdef __REACTOS__
|
#if !defined(_USER32_) && defined(__REACTOS__)
|
||||||
BOOL bHasIml = BUTTON_DrawIml(hdc, &infoPtr->imlData, &r, TRUE, 0);
|
BOOL bHasIml = BUTTON_DrawIml(hdc, &infoPtr->imlData, &r, TRUE, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1229,12 +1229,16 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
empty_rect:
|
empty_rect:
|
||||||
|
#if !defined(_USER32_) && defined(__REACTOS__)
|
||||||
|
if (bHasIml)
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
rc->right = r.left;
|
rc->right = r.left;
|
||||||
rc->bottom = r.top;
|
rc->bottom = r.top;
|
||||||
return (UINT)-1;
|
return (UINT)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
#if !defined(_USER32_) && defined(__REACTOS__)
|
||||||
if (bHasIml)
|
if (bHasIml)
|
||||||
{
|
{
|
||||||
if (infoPtr->imlData.uAlign == BUTTON_IMAGELIST_ALIGN_LEFT)
|
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.
|
* 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;
|
RECT rcText = *rc;
|
||||||
BUTTON_DrawIml(hdc, &infoPtr->imlData, &rcText, FALSE, 0);
|
BUTTON_DrawIml(hdc, &infoPtr->imlData, &rcText, FALSE, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue