overlay buttons globalRect has wrong y co-ordinate (represents center of the object, rather than the top)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Confirmed
|
High
|
Unassigned | ||
camera-app |
Confirmed
|
High
|
Florian Boucault | ||
ubuntu-ui-toolkit (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The globalRect property of an object is supposed to represent the top left hand corner of it, along with the width and height. Taking advantage of that fact, Autopilot calculates the middle as x, y = x+w/2, y+h/2
This calculation seems to have been thrown off by the overlay buttons in the camera-app. In this case the globalRect represents the center of the object. We determined this by enabling the touch vizualisation in Unity8:
$ apt-get install qtdbus-qt5
$ qdbus --system com.canonical.
When clicking using click_object this clicks in the center, just below the button. If we use the globalRect co-ordinates directly (without adding width and height) it clicks in the exact center of the button.
Note that camera-app seems to be the only application affected by this issue at the moment.
Another note - the x, y, width and height properties (outside of globalRect) seem to be correct.
$ system-image-cli -i
current build number: 187
device name: krillin
channel: ubuntu-
last update: 2015-11-24 09:51:16
version version: 187
version ubuntu: 20151124
version device: 20151028-869191d
version custom: 20151111-
Changed in canonical-devices-system-image: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → ww02-2016 |
camera-app is the only app that I know that deals with rotation of the device by rotating the buttons individually (the buttons rotate when changing orientation, not the whole app). Could it be related to that?