mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 23:33:24 +08:00
[0.4.9] cherry-pick [COMCTL32] Simplify some ifdefs CORE-14649
Addendum to16d6c9b5e0Giannis suggested and Thomas explained: Before the Wine sync, comctl32/button.c was based on ROS's user32/button.c, so _USER32_ would highlight changes between user32 (originally based on Wine) and comctl32. Now our comctl32/button.c is based on Wine's comctl32/button.c, so __REACTOS__ is enough. (cherry picked from commit1c151c9977)
This commit is contained in:
@@ -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;
|
||||
#if !defined(_USER32_) && defined(__REACTOS__)
|
||||
#ifdef __REACTOS__
|
||||
BOOL bHasIml = BUTTON_DrawIml(hdc, &infoPtr->imlData, &r, TRUE, 0);
|
||||
#endif
|
||||
|
||||
@@ -1229,7 +1229,7 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
|
||||
|
||||
default:
|
||||
empty_rect:
|
||||
#if !defined(_USER32_) && defined(__REACTOS__)
|
||||
#ifdef __REACTOS__
|
||||
if (bHasIml)
|
||||
break;
|
||||
#endif
|
||||
@@ -1238,7 +1238,7 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
|
||||
return (UINT)-1;
|
||||
}
|
||||
|
||||
#if !defined(_USER32_) && defined(__REACTOS__)
|
||||
#ifdef __REACTOS__
|
||||
if (bHasIml)
|
||||
{
|
||||
if (infoPtr->imlData.uAlign == BUTTON_IMAGELIST_ALIGN_LEFT)
|
||||
@@ -1322,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.
|
||||
*/
|
||||
|
||||
#if !defined(_USER32_) && defined(__REACTOS__)
|
||||
#ifdef __REACTOS__
|
||||
RECT rcText = *rc;
|
||||
BUTTON_DrawIml(hdc, &infoPtr->imlData, &rcText, FALSE, 0);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user