Merge branch 'master' of ssh://git.haiku-os.org/haiku

This commit is contained in:
threedeyes 2012-10-20 01:09:21 +00:00
commit 8bdfb1a97d

View File

@ -806,6 +806,9 @@ BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
if (!rect.IsValid() || !rect.Intersects(updateRect))
return;
// save the clipping constraints of the view
view->PushState();
// separate the bar in two sides
float sliderPosition;
BRect leftBarSide = rect;
@ -847,8 +850,8 @@ BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
view->PopState();
// reset clipping constraints
view->ConstrainClippingRegion(NULL);
// restore the clipping constraints of the view
view->PopState();
}
@ -1309,15 +1312,11 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, const BRect& updateRect,
if (!rect.IsValid() || !rect.Intersects(updateRect))
return;
// clipping constraints for the view
BRegion clipping;
view->GetClippingRegion(&clipping);
// save the clipping constraints of the view
view->PushState();
// intersect constraints with updateRect
BRegion updateClipping(updateRect);
clipping.IntersectWith(&updateClipping);
// clip to the intersection
// set clipping constraints to updateRect
BRegion clipping(updateRect);
view->ConstrainClippingRegion(&clipping);
rgb_color edgeShadowColor;
@ -1396,8 +1395,8 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, const BRect& updateRect,
view->FillRect(rect, fillGradient);
// reset clipping constraints
view->ConstrainClippingRegion(NULL);
// restore the clipping constraints of the view
view->PopState();
}
@ -1901,7 +1900,7 @@ BControlLook::_DrawButtonFrame(BView* view, BRect& rect,
// save the clipping constraints of the view
view->PushState();
// set cliping constraints to updateRect
// set clipping constraints to updateRect
BRegion clipping(updateRect);
view->ConstrainClippingRegion(&clipping);
@ -2172,7 +2171,7 @@ BControlLook::_DrawButtonBackground(BView* view, BRect& rect,
// save the clipping constraints of the view
view->PushState();
// set cliping constraints to updateRect
// set clipping constraints to updateRect
BRegion clipping(updateRect);
view->ConstrainClippingRegion(&clipping);
@ -2358,15 +2357,11 @@ BControlLook::_DrawMenuFieldBackgroundInside(BView* view, BRect& rect,
if (!rect.IsValid() || !rect.Intersects(updateRect))
return;
// clipping constraints for the view
BRegion clipping;
view->GetClippingRegion(&clipping);
// save the clipping constraints of the view
view->PushState();
// intersect constraints with updateRect
BRegion updateClipping(updateRect);
clipping.IntersectWith(&updateClipping);
// clip to the intersection
// set clipping constraints to updateRect
BRegion clipping(updateRect);
view->ConstrainClippingRegion(&clipping);
// frame colors
@ -2540,8 +2535,8 @@ BControlLook::_DrawMenuFieldBackgroundInside(BView* view, BRect& rect,
// fill in the background
view->FillRect(rect, fillGradient);
// reset clipping constraints
view->ConstrainClippingRegion(NULL);
// restore the clipping constraints of the view
view->PopState();
}