[listitem] swiping doesn't work when a mousearea on top doesn't accept the mouse event
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| ubuntu-ui-toolkit (Ubuntu) |
High
|
Zsombor Egri |
Bug Description
staging r1603
ListItem { MouseArea { onPressed: mouse.accepted = false } }
When a MouseArea doesn't accept a mouse event, the ListItem becomes non-swipable.
After discussing this with kalikiana, we agreed that this behaviour is not intended and should be fixed.
Not accepting a mouse event from within the listitem shouldn't stop the swiping mechanism from activating.
The same applies to ListItem highlight or click, they should not be stopped by a MouseArea which is inside the listitem if that mouse area doesn't accept the mouse event
Related branches
- PS Jenkins bot: Approve (continuous-integration) on 2015-09-01
- Christian Dywan: Approve on 2015-08-31
-
Diff: 121 lines (+35/-18)4 files modifiedsrc/Ubuntu/Components/plugin/uclistitem.cpp (+6/-16)
src/Ubuntu/Components/plugin/uclistitem_p.h (+1/-1)
tests/unit_x11/tst_components/ListItemTestCase.qml (+1/-0)
tests/unit_x11/tst_components/tst_listitem_extras.qml (+27/-1)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
importance: | Medium → High |
assignee: | nobody → Zsombor Egri (zsombi) |
Zsombor Egri (zsombi) wrote : | #1 |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | Confirmed → In Progress |
Launchpad Janitor (janitor) wrote : | #2 |
This bug was fixed in the package ubuntu-ui-toolkit - 1.3.1627+
---------------
ubuntu-ui-toolkit (1.3.1627+
[ Zsombor Egri ]
* Implement list item expansion.
* Turn AdaptivePageLayout page creation to be asynchronous.
* Fix ListItem swipe handling when gesture is initiated over an overlay
MouseArea which does not accept pressed event. Fixes LP: #1484545
* AbstractButton to C++. Fixes LP: #1365471, LP: #1458028
* Haptics singleton moved to C++.
* ActionItem moved to C++.
* Making columns resizable in an AdaptivePageLayout.
* Introducing column configuration into AdaptivePageLayout.
[ Benjamin Zeller ]
* Fix build inside qt and shadowbuild.
[ Tim Peeters ]
* Remove old and unused header-related files, and update unit test filenames.
* Don't unset the subheader style when Page.head changes because that unsets
the parent of Page.head.contents. Fixes LP: #1488922
* Fix the theming of the MainView.
* Fix the background color of the overflow panel.
[ Christian Dywan ]
* Include change signals with arguments in .api.
* A public QML type with no version is an error. Rather than silently breaking
as QML does normally at least apicheck can make this fatal.
* UbuntuShape shouldn't emit redundant deprecation warnings. Fixes LP: #1481791
* Update .bzrignore to new upstream style layout. Fixes LP: #1433308
* Revert unnecessary change of Popover minimumWidth. Fixes LP: #1483708
[ Ken VanDine ]
* Fixed a few typos in the api docs for StateSaver.
[ Olivier Tilloy ]
* Take custom key indexes into account to allow sorting on custom roles.
Fixes LP: #1485674
[ Albert Astals Cid ]
* Properly free shapeTextures[
will still be around when the opengl context is destroyed, but that seldom
happens so connect the signal to a lambda that will be there and does the
cleanup properly. Without this patch testDirectional
hitting the qFatal because it ran out of space in shapeTextures.
[ Richard Huddie ]
* Remove all usage of the autopilot simulated keyboard when the OSK is being
used. Fixes LP: 31483668
[ Gerry Boland ]
* Compensate for Qt's device pixel ratio multiplier.
Fixes: LP: #1207270, LP: #1275748, LP: #1468402
[ Nick Dedekind ]
* Added relative date time i18n.
[ CI Train Bot ]
* Resync trunk.
-- Zoltan Balogh <email address hidden> Tue, 08 Sep 2015 04:10:50 +0000
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Released |
We have a problem here: there's no way for us to know whether the overlaid MouseArea did or did not accept mouse events. childMouseEvent Filter acts prior the MouseArea's mousePressed() is handled, so the event is still in accepted state. As result of onPressed: mouse.accepted = false, ListItem is also getting the mouse event, but the accepted state is still true.
We could rely on mouseEvent() being caught when overlaid items do not accept mouse events, after all all accepted events are suppressed and ListItem's event handler won't be called anymore...