Revert "ControlLook: remove some bogus clipping"

This reverts commit b277177477.
This commit is contained in:
Adrien Destugues 2017-08-16 17:48:58 +02:00
parent b277177477
commit b8d9fcbeb3

View File

@ -2518,6 +2518,13 @@ BControlLook::_DrawButtonBackground(BView* view, BRect& rect,
if (!rect.IsValid() || !rect.Intersects(updateRect))
return;
// save the clipping constraints of the view
view->PushState();
// set clipping constraints to updateRect
BRegion clipping(updateRect);
view->ConstrainClippingRegion(&clipping);
// If the button is flat and neither activated nor otherwise highlighted
// (mouse hovering or focussed), draw it flat.
if ((flags & B_FLAT) != 0
@ -2531,6 +2538,9 @@ BControlLook::_DrawButtonBackground(BView* view, BRect& rect,
leftTopRadius, rightTopRadius, leftBottomRadius, rightBottomRadius,
base, popupIndicator, flags, borders, orientation);
}
// restore the clipping constraints of the view
view->PopState();
}