ListBox scrollbar display bug


With the scrollbars in any listboxes i make, and ‘upwards’ motion of the bar causes gfx glitches until it’s been re-painted.

Scrolling upwards using the mouse-drag method causes the glitch whilst it is being dragged, then the mouse activity after dragging causes a repaint and the glitch gfx disappears.

however, scrolling with the wheel, or changing the length of the list such that the scrollbar thumbsize decreases (causing the bottom edge of it to move upwards in the display) causes the glitch to stay. It’s only a pixel or two in height. It’s either the bottom pixel line of the thumb, or the drop shadow being left there ( i think it’s probably the latter ).

any fix for this?


I think that’s because I changed the scrollbar code to only repaint the bits that change when it moves. Didn’t notice the artifacts, and I’ll tweak it for the next release, but if you want to fix it, try this in juce_Scrollbar.cpp, line 196

    const int repaintStart = jmin (thumbStart, newThumbStart) - 4;
    const int repaintSize = jmax (thumbStart + thumbSize, newThumbStart + newThumbSize) + 8 - repaintStart;

That just extends the repaint area by a few pixels.