[FIXED]Component::isMouseOver() not considering Transform scaling?


#1

Hi there,
I’ve recently stumbled about this issue when applying an AffineTransform::Scale on a Viewport, but I think this is a more generic issue.
Basically, when I scale my viewport using, let’s say, a factor of 1.5, the thumb of the scrollbars don’t always seem to be repainted correctly when the mouse cursor is on them.
I think this is because the paint routine implemented by ScrollBar makes use of Component::isMouseOver(), which to me looks like it’s not checking for transformations that are currently being applied to the component.
Any input on this?
Cheers!


#2

I think this is actually due to a rounding error in Component::isMouseOver(). I’ve just pushed a fix to develop here - can you test it and see if it works for you?


#3

Yep, that’s it!
Thanks :slight_smile: