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)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1616926

Title:
  Scrollbar thumb shows as hovered after mouse is released outside the
  thumb

Status in Canonical System Image:
  New
Status in ubuntu-ui-toolkit package in Ubuntu:
  In Progress
Status in ubuntu-ui-toolkit package in Ubuntu RTM:
  New

Bug description:
  ubuntu-ui-toolkit r2079

  The fix to bug #1608897 created another issue.

  The code that checks if the thumb is being hovered currently only
  checks the y position of the input event, an optimization that worked
  well with the previous assumption that releasing mouse would always
  reset the hover state (but that was causing bug #1608897).

  There were, in fact, 2 cases before:
  - input device moves away (no pressed buttons) -> onExited is fired -> hover 
is reset
  - input device moves away while press-hold is in progress --> onRelease will 
reset hover

  Now that the behaviour changed and release does not reset the hover
  state, we obviously need to check both x and y position

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1616926/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to