adjcx = get_rect_cx(infoPtr, &rcAdj);
if (infoPtr->uNumBands == 0) {
- TRACE("No bands - setting size to (0,%d), vert: %x\n", adjcx, infoPtr->dwStyle & CCS_VERT);
+ TRACE("No bands - setting size to (0,%d), style: %x\n", adjcx, infoPtr->dwStyle);
infoPtr->calcSize.cx = adjcx;
/* the calcSize.cy won't change for a 0 band rebar */
infoPtr->uNumRows = 0;
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))
+ {
+ 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;
}
TRACE ("drawing band separator bottom (%s)\n",
wine_dbgstr_rect(&rcRowSep));
+#ifdef __REACTOS__
+ rcBandReal = rcRowSep;
+#endif
}
}
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
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
#endif
}
+#ifdef __REACTOS__
+ if (!theme)
+#else
if (theme)
{
/* When themed, the background color is ignored (but not a
DrawThemeBackground (theme, hdc, 0, 0, &cr, &rcBand);
}
else
+#endif
{
old = SetBkColor (hdc, new);
TRACE("%s background color=0x%06x, band %s\n",
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;
}
if (lprbbi->fMask & RBBIM_CHILDSIZE) {
lprbbi->cxMinChild = lpBand->cxMinChild;
lprbbi->cyMinChild = lpBand->cyMinChild;
- /* to make tests pass we follow Windows behaviour and allow to read these fields only
+ /* to make tests pass we follow Windows' behaviour and allow reading these fields only
* for RBBS_VARIABLEHEIGHTS bands */
if (lprbbi->cbSize >= REBARBANDINFOW_V6_SIZE && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
lprbbi->cyChild = lpBand->cyChild;
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;