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

Bug #1616926 reported by Andrea Bernabei on 2016-08-25
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
High
Zoltan Balogh
ubuntu-ui-toolkit (Ubuntu)
High
Andrea Bernabei
ubuntu-ui-toolkit (Ubuntu RTM)
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

Andrea Bernabei (faenil) on 2016-08-25
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)
Andrea Bernabei (faenil) on 2016-08-26
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → In Progress
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)

Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Committed
Łukasz Zemczak (sil2100) wrote :
Download full text (3.8 KiB)

This bug was fixed in the package ubuntu-ui-toolkit 1.3.2104+15.04.20160919.3 in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay

---------------

ubuntu-ui-toolkit (1.3.2104+15.04.20160919.3) vivid; urgency=medium

  [ Andrea Bernabei ]
  * Scrollbar: more hover related bugfixes and unit tests.
    Fixes: LP: #1616868, LP: #1616926

  [ Christian Dywan ]
  * QuickUtils.rootObject() needs to handle QQuickWindow. Fixes: LP: #1617745
  * Correctly test and fix trigger override of ComboButton. Fixes: LP: #1614045

  [ Zoltan Balogh ]
  Increase the top marging when scrolling upwards. Fixes LP: 1618581

  [ Timo Jyrinki ]
  * Temporarily skip unit tests on xenial while not all MPs to fix Qt 5.6 issues
    have landed yet.

  [ Michael Terry ]
  * Make ActivityIndicator spinner blue instead of orange. Fixes: LP: #1577828.

  [ Loïc Molinari ]
  * Changed src/ directory layout. Made the source directory layout consistent
    with Qt libs. The C++ libraries have been moved to src/ and the QML modules
    to src/imports/. That also makes it easier to differentiate between modules
    and libraries since we have a bunch of them now.
  * Moved internal tools meant to generate code for the toolkit lib from the QML
    module directory to the lib directory where it makes more sense.
  * Fixed the build as a Qt submodule.
  * Fixed, cleaned up and standardised header inclusions. Apart from the clean
    up and the readability improvements, this fixes a bunch of broken private
    header inclusions (#include "foo_p.h" in private headers instead of
    "private/foo_p.h" or better ), now all the private headers of the UITK can
    be included by the users withour compilation issues. It also removes a bunch
    of direct includes from sources and a few INCLUDEPATHs hacks.See the CODING
    file for more details.
  * Cleaned up ubuntu_qt_module.prf and the libs using it.
    1/ Moved the common config options from the pro files to the prf file to
       avoid duplications and simplify the files.
    2/ Removed the useless "TEMPLATE=lib" and "load(qt_build_config)" lines from
       the pro files since it's done for us by qt_module.prf.
    3/ Use QT= instead of QT*= since it's well defined that by default its
       content is "core gui".
    4/ Prefixed headers and sources by $$PWD/ and sorted the lines
       alphabetically.
    5/ Merged the SOURCES declarations in UbuntuToolkit.pro.
    6/ Removed the useless "DEFINES += QT_USE_QSTRINGBUILDER" line from
       UbuntuToolkit.pro since it's done for us by qt_module.prf.
    7/ Removed the useless "QMAKE_CXXFLAGS -= -Werror=deprecated-declarations"
       and "DEFINES -= QT_DEPRECATED_WARNINGS" lines from UbuntuToolkit.pro
       since it's already done in ubuntu_qt_module.prf.
    8/ Added a few comments.
  * Made use of Qt builtin to check GCC version.

  [ Tim Peeters ]
  * Improve the initialization of Action when it gets both iconName and
    iconSource from an external component when iconSource is undefined. This
    fixes the some times missing overflow button in the ActionBar with Qt 5.6.
    I also removed action: modelData from the OverflowPanel because this is
    a...

Read more...

Changed in ubuntu-ui-toolkit (Ubuntu RTM):
status: New → Fix Released
Changed in canonical-devices-system-image:
status: New → Fix Committed
importance: Undecided → High
milestone: none → 14
Launchpad Janitor (janitor) wrote :
Download full text (3.8 KiB)

This bug was fixed in the package ubuntu-ui-toolkit - 1.3.2104+16.10.20160919.3

---------------
ubuntu-ui-toolkit (1.3.2104+16.10.20160919.3) yakkety; urgency=medium

  [ Andrea Bernabei ]
  * Scrollbar: more hover related bugfixes and unit tests.
    Fixes: LP: #1616868, LP: #1616926

  [ Christian Dywan ]
  * QuickUtils.rootObject() needs to handle QQuickWindow. Fixes: LP: #1617745
  * Correctly test and fix trigger override of ComboButton. Fixes: LP: #1614045

  [ Zoltan Balogh ]
  Increase the top marging when scrolling upwards. Fixes LP: 1618581

  [ Timo Jyrinki ]
  * Temporarily skip unit tests on xenial while not all MPs to fix Qt 5.6 issues
    have landed yet.

  [ Michael Terry ]
  * Make ActivityIndicator spinner blue instead of orange. Fixes: LP: #1577828.

  [ Loïc Molinari ]
  * Changed src/ directory layout. Made the source directory layout consistent
    with Qt libs. The C++ libraries have been moved to src/ and the QML modules
    to src/imports/. That also makes it easier to differentiate between modules
    and libraries since we have a bunch of them now.
  * Moved internal tools meant to generate code for the toolkit lib from the QML
    module directory to the lib directory where it makes more sense.
  * Fixed the build as a Qt submodule.
  * Fixed, cleaned up and standardised header inclusions. Apart from the clean
    up and the readability improvements, this fixes a bunch of broken private
    header inclusions (#include "foo_p.h" in private headers instead of
    "private/foo_p.h" or better ), now all the private headers of the UITK can
    be included by the users withour compilation issues. It also removes a bunch
    of direct includes from sources and a few INCLUDEPATHs hacks.See the CODING
    file for more details.
  * Cleaned up ubuntu_qt_module.prf and the libs using it.
    1/ Moved the common config options from the pro files to the prf file to
       avoid duplications and simplify the files.
    2/ Removed the useless "TEMPLATE=lib" and "load(qt_build_config)" lines from
       the pro files since it's done for us by qt_module.prf.
    3/ Use QT= instead of QT*= since it's well defined that by default its
       content is "core gui".
    4/ Prefixed headers and sources by $$PWD/ and sorted the lines
       alphabetically.
    5/ Merged the SOURCES declarations in UbuntuToolkit.pro.
    6/ Removed the useless "DEFINES += QT_USE_QSTRINGBUILDER" line from
       UbuntuToolkit.pro since it's done for us by qt_module.prf.
    7/ Removed the useless "QMAKE_CXXFLAGS -= -Werror=deprecated-declarations"
       and "DEFINES -= QT_DEPRECATED_WARNINGS" lines from UbuntuToolkit.pro
       since it's already done in ubuntu_qt_module.prf.
    8/ Added a few comments.
  * Made use of Qt builtin to check GCC version.

  [ Tim Peeters ]
  * Improve the initialization of Action when it gets both iconName and
    iconSource from an external component when iconSource is undefined. This
    fixes the some times missing overflow button in the ActionBar with Qt 5.6.
    I also removed action: modelData from the OverflowPanel because this is
    already set automatically in ActionSelectionPopover after everything is
    initia...

Read more...

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Fix Committed → Fix Released
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.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers