Scrollbar thumb shows as hovered after mouse is released outside the thumb
Bug #1616926 reported by
Andrea Bernabei
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
High
|
Zoltan Balogh | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
High
|
Andrea Bernabei | ||
ubuntu-ui-toolkit (Ubuntu RTM) |
Fix Released
|
Undecided
|
Andrea Bernabei |
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
Related branches
lp://staging/~faenil/ubuntu-ui-toolkit/scrollbar_moreHoverFixesAndTests
- ubuntu-sdk-build-bot: Needs Fixing (continuous-integration)
- Cris Dywan: Approve
-
Diff: 662 lines (+290/-154)3 files modifiedsrc/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml (+49/-28)
tests/unit/visual/ScrollbarTestCase13.qml (+3/-0)
tests/unit/visual/tst_scrollbar.13.qml (+238/-126)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Andrea Bernabei (faenil) |
importance: | Undecided → High |
Changed in ubuntu-ui-toolkit (Ubuntu RTM): | |
assignee: | nobody → Andrea Bernabei (faenil) |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | New → Fix Committed |
importance: | Undecided → High |
milestone: | none → 14 |
Changed in canonical-devices-system-image: | |
assignee: | nobody → Zoltan Balogh (bzoltan) |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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)