From d316dc57ded8d78e2cc10494c307c8be80f59fdc Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 14 Jul 2011 15:52:45 +0000 Subject: [PATCH] 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 --- src/kits/interface/Slider.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/kits/interface/Slider.cpp b/src/kits/interface/Slider.cpp index 0509f1d525..b4f6730085 100644 --- a/src/kits/interface/Slider.cpp +++ b/src/kits/interface/Slider.cpp @@ -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;