B_BLOCK_THUMB style actually deletes the background, so it's safe to exclude

its region when clearing the background in Draw().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13352 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-06-29 15:53:46 +00:00
parent 6f54957024
commit a66e28b1ff

View File

@ -674,8 +674,11 @@ BSlider::Draw(BRect updateRect)
BRegion background(updateRect);
background.Exclude(BarFrame());
// ToDo: the thumb doesn't delete its background, so we still have to do it
//background.Exclude(ThumbFrame());
// 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)
background.Exclude(ThumbFrame());
if (background.Frame().IsValid())
OffscreenView()->FillRegion(&background, B_SOLID_LOW);
@ -1463,6 +1466,7 @@ BSlider::_DrawBlockThumb()
}
// blank background for shadow
// ToDo: this also draws over the hash marks (though it's not *that* noticeable)
view->SetHighColor(no_tint);
view->StrokeLine(BPoint(frame.left, frame.top),
BPoint(frame.left, frame.top));