Author: pulkomandy Date: 2011-07-14 17:52:45 +0200 (Thu, 14 Jul 2011) New Revision: 42425 Changeset: https://dev.haiku-os.org/changeset/42425 Ticket: https://dev.haiku-os.org/ticket/7817 Modified: haiku/trunk/src/kits/interface/Slider.cpp Log: 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. Modified: haiku/trunk/src/kits/interface/Slider.cpp =================================================================== --- haiku/trunk/src/kits/interface/Slider.cpp 2011-07-14 15:07:54 UTC (rev 42424) +++ haiku/trunk/src/kits/interface/Slider.cpp 2011-07-14 15:52:45 UTC (rev 42425) @@ -810,21 +810,6 @@ 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;