From a66e28b1ffb600c573dcd2451fee94fa58af74a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 29 Jun 2005 15:53:46 +0000 Subject: [PATCH] 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 --- src/kits/interface/Slider.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/Slider.cpp b/src/kits/interface/Slider.cpp index 61806c4833..f45b281f84 100644 --- a/src/kits/interface/Slider.cpp +++ b/src/kits/interface/Slider.cpp @@ -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));