X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdll%2Fwin32%2Fcomctl32%2Frebar.c;h=52a1717d8d24ee611ce0d90ce0670a2f6e3705c2;hp=39950b99e535fa908312b4080f580b2833f070ca;hb=55ee8217db6cfeff7a0b5673c37fd809dd60af27;hpb=70a31e656a1ed12008173089193d97f98bdeefc3 diff --git a/reactos/dll/win32/comctl32/rebar.c b/reactos/dll/win32/comctl32/rebar.c index 39950b99e53..52a1717d8d2 100644 --- a/reactos/dll/win32/comctl32/rebar.c +++ b/reactos/dll/win32/comctl32/rebar.c @@ -1831,6 +1831,17 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc) HRGN hrgn; GetClientRect (infoPtr->hwndSelf, &cr); + +#ifdef __REACTOS__ + if (theme) + { + if (IsThemeBackgroundPartiallyTransparent(theme, RP_BACKGROUND, 0)) + { + DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &cr); + } + DrawThemeBackground (theme, hdc, 0, 0, &cr, NULL); + } +#endif hrgn = CreateRectRgn(cr.left, cr.top, cr.right, cr.bottom); oldrow = -1; @@ -1921,6 +1932,9 @@ 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 @@ -1928,6 +1942,7 @@ 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", @@ -1945,6 +1960,9 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc) } #if 1 +#ifdef __REACTOS__ + if (!theme) +#endif { //FIXME: Apparently painting the remaining area is a v6 feature HBRUSH hbrush = CreateSolidBrush(new); @@ -3243,7 +3261,11 @@ REBAR_NCCalcSize (const REBAR_INFO *infoPtr, RECT *rect) else if ((theme = GetWindowTheme (infoPtr->hwndSelf))) { /* FIXME: should use GetThemeInt */ +#ifdef __REACTOS__ + rect->top = (rect->top + 1 < rect->bottom) ? rect->top : rect->bottom; +#else rect->top = min(rect->top + 1, rect->bottom); +#endif } TRACE("new client=(%s)\n", wine_dbgstr_rect(rect)); return 0;