When i draw the thumb button in drawScrollbar a bit bigger (to overlap the scrollbarbuttons) it does not correctly paint the scrollbar when i move the slider. only when the mouse is released is the whole slider updated correctly. I guess during the sliding only the area as big as the thumbStartPosition + thumbSize is updated.
Is there anything i can do to correct this?
I,d like to draw the scrollbar without any buttons on the top (or side).
void AvenueLookAndFeel::drawScrollbar (Graphics& g,
ScrollBar& s,
int x, int y,
int width, int height,
bool isScrollbarVertical,
int thumbStartPosition,
int thumbSize,
bool /*isMouseOver*/,
bool /*isMouseDown*/)
{
//background
g.setColour (colourBackGroundLight);
g.fillRoundedRectangle (0.0f, 0.0f, width, height + (2*getScrollbarButtonSize(s)), 4.0000f);
//slider button
g.setColour (colourButtonUp);
if (isScrollbarVertical)
{
if (thumbSize > 0)
{
g.fillRoundedRectangle (x,
thumbStartPosition - getScrollbarButtonSize(s),
width,
thumbSize + (2*getScrollbarButtonSize(s)),
4.0f);
}
}
else
{
if (thumbSize > 0)
{
g.fillRoundedRectangle (thumbStartPosition - getScrollbarButtonSize(s),
y,
thumbSize + (2*getScrollbarButtonSize(s)),
height,
4.0f);
}
}
}
