overlay buttons globalRect has wrong y co-ordinate (represents center of the object, rather than the top)

Bug #1520164 reported by Brendan Donegan
6
This bug affects 1 person
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.Unity.Screen / com.canonical.Unity.Screen.setTouchVisualizationEnabled true

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-touch/rc-proposed/bq-aquaris.en
last update: 2015-11-24 09:51:16
version version: 187
version ubuntu: 20151124
version device: 20151028-869191d
version custom: 20151111--36-46-vivid

Revision history for this message
Tim Peeters (tpeeters) wrote :

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?

Changed in canonical-devices-system-image:
status: New → Confirmed
importance: Undecided → High
milestone: none → ww02-2016
Revision history for this message
Florian Boucault (fboucault) wrote :

Just to be clear, I think this bug can be reproduced by running the AP test: camera_app.tests.test_options.TestCameraOptions.test_toggle_grid_lines

Error log at: http://pastebin.ubuntu.com/13514363/

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Well it will be once this is fixed: https://bugs.launchpad.net/camera-app/+bug/1520171

Revision history for this message
Florian Boucault (fboucault) wrote :

Very likely cause of this bug is https://bugs.launchpad.net/qtubuntu/+bug/1422523

Changed in camera-app:
status: New → Confirmed
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Invalid
Changed in camera-app:
importance: Undecided → High
assignee: nobody → Florian Boucault (fboucault)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.