Comment 1 for bug 1616926

Revision history for this message
Andrea Bernabei (faenil) wrote :

New hover area check (part of the linked MR)

For vertical scrollbar:
hovered == (x is inside the TROUGH) && (y is inside the THUMB)

For horizontal scrollbar:
hovered == (x is inside the THUMB) && (y is inside the TROUGH)

This means we're also providing an error margin along the "scrolling" axis (x for vert scrollbar, y for horiz scrollbar), where it's enough for the mouse to be inside the trough instead of inside the thumb.

This makes it easier to hover and drag both using mouse and touch, as it currently provides an additional 3dp of interactive area on each side of the thumb (thumb's width is 8dp, trough's width is 14dp at the moment)