InverseMouseArea without sensingArea doesn't work
Bug #1166127 reported by
Michał Sawicz
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Released
|
High
|
Zsombor Egri | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Raring |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
InverseMouseArea's default sensingArea seems to be broken - uncommenting the sensingArea binding in the example below makes it work.
The tests pass, so they need to be improved.
import QtQuick 2.0
import Ubuntu.Components 0.1
Item {
id: root
width: units.gu(80)
height: units.gu(80)
MouseArea {
onClicked: console.
}
Rectangle {
width: units.gu(10)
height: units.gu(10)
color: "red"
// sensingArea: root
}
}
}
Related branches
lp:~zsombi/ubuntu-ui-toolkit/fix-sensingArea-on-phablet
- Michał Sawicz: Approve (functional)
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 104 lines (+60/-3)4 files modifiedmodules/Ubuntu/Components/plugin/quickutils.cpp (+3/-2)
tests/unit/tst_inversemousearea/SensingAreaError.qml (+45/-0)
tests/unit/tst_inversemousearea/tst_inversemousearea.pro (+2/-1)
tests/unit/tst_inversemousearea/tst_inversemouseareatest.cpp (+10/-0)
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Zsombor Egri (zsombi) |
Changed in ubuntu-ui-toolkit: | |
status: | Confirmed → In Progress |
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I can confirm that this is also not working properly for the toolbar. The GenericToolbar has an InverseMouseArea inside it that is used so that the user can tap anywhere outside of the toolbar area, and the toolbar will be hidden (this was required for the gallery-app). However, this only seems to work randomly. Only about one in five clicks outside of the toolbar area will cause an onClicked event. Adding sensingArea: bottomBar.parent to the IMA in GenericToolbar.qml does not change the incorrect behavior.