https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b8062bde5d9f4e5272278…
commit b8062bde5d9f4e5272278d7dff155e9085538fc2
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Fri Jan 12 18:49:09 2018 +0200
Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Mon Jan 15 12:57:06 2018 +0200
[COMCTL32] rebar: Remove some hacks and fix checking for transparent background
---
dll/win32/comctl32/rebar.c | 49 +---------------------------------------------
1 file changed, 1 insertion(+), 48 deletions(-)
diff --git a/dll/win32/comctl32/rebar.c b/dll/win32/comctl32/rebar.c
index 525c4cc524..d4896142bd 100644
--- a/dll/win32/comctl32/rebar.c
+++ b/dll/win32/comctl32/rebar.c
@@ -1826,43 +1826,28 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC
hdc)
RECT cr;
COLORREF old = CLR_NONE, new;
HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
-#ifdef __REACTOS__
- HRGN hrgn;
-#endif
GetClientRect (infoPtr->hwndSelf, &cr);
#ifdef __REACTOS__
-
if (theme)
{
- if (IsThemeBackgroundPartiallyTransparent(theme, RP_BACKGROUND, 0))
+ if (IsThemeBackgroundPartiallyTransparent(theme, 0, 0))
{
DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &cr);
}
DrawThemeBackground (theme, hdc, 0, 0, &cr, NULL);
}
-
- hrgn = CreateRectRgn(cr.left, cr.top, cr.right, cr.bottom);
-
#endif
oldrow = -1;
for(i=0; i<infoPtr->uNumBands; i++) {
RECT rcBand;
-#ifdef __REACTOS__
- RECT rcBandReal;
- HRGN hrgnBand;
-#endif
lpBand = REBAR_GetBand(infoPtr, i);
if (HIDDENBAND(lpBand)) continue;
translate_rect(infoPtr, &rcBand, &lpBand->rcBand);
-#ifdef __REACTOS__
- rcBandReal = rcBand;
-#endif
-
/* draw band separator between rows */
if (lpBand->iRow != oldrow) {
oldrow = lpBand->iRow;
@@ -1887,9 +1872,6 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC
hdc)
}
TRACE ("drawing band separator bottom (%s)\n",
wine_dbgstr_rect(&rcRowSep));
-#ifdef __REACTOS__
- rcBandReal = rcRowSep;
-#endif
}
}
@@ -1900,9 +1882,6 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC
hdc)
if (infoPtr->dwStyle & CCS_VERT) {
rcSep.bottom = rcSep.top;
rcSep.top -= SEP_WIDTH_SIZE;
-#ifdef __REACTOS__
- rcBandReal.top -= SEP_WIDTH_SIZE;
-#endif
if (theme)
DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED,
BF_BOTTOM, NULL);
else
@@ -1911,9 +1890,6 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC
hdc)
else {
rcSep.right = rcSep.left;
rcSep.left -= SEP_WIDTH_SIZE;
-#ifdef __REACTOS__
- rcBandReal.left -= SEP_WIDTH_SIZE;
-#endif
if (theme)
DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED,
BF_RIGHT, NULL);
else
@@ -1944,9 +1920,6 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC
hdc)
#endif
}
-#ifdef __REACTOS__
- if (!theme)
-#else
if (theme)
{
/* When themed, the background color is ignored (but not a
@@ -1954,7 +1927,6 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC
hdc)
DrawThemeBackground (theme, hdc, 0, 0, &cr, &rcBand);
}
else
-#endif
{
old = SetBkColor (hdc, new);
TRACE("%s background color=0x%06x, band %s\n",
@@ -1965,26 +1937,7 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC
hdc)
if (lpBand->clrBack != CLR_NONE)
SetBkColor (hdc, old);
}
-
-#ifdef __REACTOS__
- hrgnBand = CreateRectRgn(rcBandReal.left, rcBandReal.top, rcBandReal.right,
rcBandReal.bottom);
- CombineRgn(hrgn, hrgn, hrgnBand, RGN_DIFF);
- DeleteObject(hrgnBand);
-#endif
}
-
-#if 1
-#ifdef __REACTOS__
- if (!theme)
-#endif
- {
- //FIXME: Apparently painting the remaining area is a v6 feature
- HBRUSH hbrush = CreateSolidBrush(new);
- FillRgn(hdc, hrgn, hbrush);
- DeleteObject(hbrush);
- }
- DeleteObject(hrgn);
-#endif
return TRUE;
}