Remove over-optimization trying not to redraw the background under slider's thumbs.

This gets sliders with custom, non-rectangle thumbs, like the one in APlayer or the example in the BeBook, working properly.
I hope it doesn't break anything - it doesn't seem to but I may have overlooked some pixels.

Fixes #7817.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42425 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues 2011-07-14 15:52:45 +00:00
parent 6c22c45346
commit d316dc57de

View File

@ -810,21 +810,6 @@ BSlider::Draw(BRect updateRect)
drawBackground = false;
}
// ToDo: the triangle thumb doesn't delete its background, so we still have
// to do it Note, this also creates a different behaviour for subclasses,
// depending on the thumb style - if possible this should be avoided.
if (Style() == B_BLOCK_THUMB) {
BRect thumbFrame = ThumbFrame();
if (be_control_look != NULL) {
// fill background where shadow will be...
// TODO: Such drawint dependent behavior should be moved into
// BControlLook of course.
thumbFrame.right--;
thumbFrame.bottom--;
}
background.Exclude(thumbFrame);
}
#if USE_OFF_SCREEN_VIEW
if (!fOffScreenBits)
return;