No longer draws any lines over the thumb area in B_BLOCK_THUMB mode.
It's now completely flicker-free in that mode, all known drawing bugs are gone. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13358 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9b030c1d2d
commit
597aa5f24d
@ -757,9 +757,10 @@ BSlider::DrawBar()
|
||||
lowerFrame.top++;
|
||||
lowerFrame.left++;
|
||||
BRect upperFrame = lowerFrame;
|
||||
BRect thumbFrame;
|
||||
|
||||
if (Style() == B_BLOCK_THUMB) {
|
||||
BRect thumbFrame = ThumbFrame();
|
||||
thumbFrame = ThumbFrame();
|
||||
|
||||
if (fOrientation == B_HORIZONTAL) {
|
||||
lowerFrame.right = thumbFrame.left;
|
||||
@ -789,7 +790,16 @@ BSlider::DrawBar()
|
||||
view->FillRect(lowerFrame);
|
||||
}
|
||||
|
||||
// ToDo: don't stroke the lines over the thumb
|
||||
if (Style() == B_BLOCK_THUMB) {
|
||||
// We don't want to stroke the lines over the thumb
|
||||
|
||||
PushState();
|
||||
|
||||
BRegion region;
|
||||
GetClippingRegion(®ion);
|
||||
region.Exclude(thumbFrame);
|
||||
ConstrainClippingRegion(®ion);
|
||||
}
|
||||
|
||||
view->SetHighColor(darken1);
|
||||
view->StrokeLine(BPoint(frame.left, frame.top),
|
||||
@ -818,6 +828,9 @@ BSlider::DrawBar()
|
||||
BPoint(frame.left, frame.top));
|
||||
view->StrokeLine(BPoint(frame.left + 1.0f, frame.top),
|
||||
BPoint(frame.right, frame.top));
|
||||
|
||||
if (Style() == B_BLOCK_THUMB)
|
||||
PopState();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user