Bug with slider's +/- buttons


#1

Hello,
I noticed a strange behaviour of the “+” and “-” buttons on sliders with a IncDecButtons style: if in my LookAndFeel I customize the drawing of the buttons when the mouse is over or pressed, both buttons get redrawn the same way as soon as I do a mouse action on one of them. For example, if the mouse is over the “+” button, both the “+” and “-” buttons are painted like if the mouse was over them.
This seems to be due to the fact that the two buttons are MouseListener of each other, as set in juce_Slider.cpp in Pimpl::lookAndFeelChanged method. I can’t understand why they need to be MouseListeners…

Thanks
Niccolò


#2

By the way, I am using the latest Git version…


#3

You say this is a custom look and feel, so surely if your buttons are repainted wrongly, that’s a bug in your custom painting routine? The default lookandfeel doesn’t have any such problems, right?