Public bug reported:

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

** Affects: camera-app
     Importance: Undecided
         Status: New

** Affects: ubuntu-ui-toolkit (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: ubuntu-ui-toolkit (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1520164

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/camera-app/+bug/1520164/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to