Merge lp:~michael-sheldon/ubuntu-keyboard/fix-1428584 into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 335
Merged at revision: 336
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/fix-1428584
Merge into: lp:ubuntu-keyboard
Diff against target: 33 lines (+11/-1)
2 files modified
qml/keys/CharKey.qml (+5/-0)
tests/autopilot/ubuntu_keyboard/emulators/keypad.py (+6/-1)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/fix-1428584
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+252436@code.launchpad.net

Commit message

Account for keys at the side of the keyboard being extended in size when calculating autopilot key positions

Description of the change

Account for keys at the side of the keyboard being extended in size when calculating autopilot key positions

To post a comment you must log in.
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ubuntu-keyboard) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/keys/CharKey.qml'
--- qml/keys/CharKey.qml 2015-02-13 20:14:07 +0000
+++ qml/keys/CharKey.qml 2015-03-10 13:59:05 +0000
@@ -49,6 +49,11 @@
49 property bool leftSide: false49 property bool leftSide: false
50 property bool rightSide: false50 property bool rightSide: false
5151
52 // These properties are used by autopilot to determine the visible
53 // portion of the key to press
54 readonly property double leftOffset: buttonImage.anchors.leftMargin
55 readonly property double rightOffset: buttonImage.anchors.rightMargin
56
52 /* design */57 /* design */
53 property string imgNormal: UI.imageCharKey58 property string imgNormal: UI.imageCharKey
54 property string imgPressed: UI.imageCharKeyPressed59 property string imgPressed: UI.imageCharKeyPressed
5560
=== modified file 'tests/autopilot/ubuntu_keyboard/emulators/keypad.py'
--- tests/autopilot/ubuntu_keyboard/emulators/keypad.py 2015-02-09 17:22:29 +0000
+++ tests/autopilot/ubuntu_keyboard/emulators/keypad.py 2015-03-10 13:59:05 +0000
@@ -43,7 +43,12 @@
43 def _iter_keys(key_type, label_fn):43 def _iter_keys(key_type, label_fn):
44 for key in self.select_many(key_type):44 for key in self.select_many(key_type):
45 with key.no_automatic_refreshing():45 with key.no_automatic_refreshing():
46 key_pos = Key.Pos(*key.globalRect)46 rect = key.globalRect
47 if key.leftSide:
48 rect = (key.globalRect[0] + key.leftOffset, key.globalRect[1], key.globalRect[2] - key.leftOffset, key.globalRect[3])
49 elif key.rightSide:
50 rect = (key.globalRect[0], key.globalRect[1], key.globalRect[2] - key.rightOffset, key.globalRect[3])
51 key_pos = Key.Pos(*rect)
47 label = label_fn(key)52 label = label_fn(key)
48 if label != '':53 if label != '':
49 contained_keys[label] = KeyPadState.NORMAL54 contained_keys[label] = KeyPadState.NORMAL

Subscribers

People subscribed via source and target branches