Merge lp:~phablet-team/ubuntu-keyboard/shellRotation into lp:ubuntu-keyboard

Proposed by kevin gunn
Status: Merged
Approved by: Michael Sheldon
Approved revision: 249
Merged at revision: 379
Proposed branch: lp:~phablet-team/ubuntu-keyboard/shellRotation
Merge into: lp:ubuntu-keyboard
Diff against target: 604 lines (+213/-279)
6 files modified
qml/Keyboard.qml (+209/-243)
qml/keys/ActionKey.qml (+1/-1)
qml/keys/CharKey.qml (+1/-1)
src/plugin/inputmethod.cpp (+1/-4)
tests/autopilot/ubuntu-keyboard-tester.desktop (+1/-0)
tests/autopilot/ubuntu_keyboard/emulators/keyboard.py (+0/-30)
To merge this branch: bzr merge lp:~phablet-team/ubuntu-keyboard/shellRotation
Reviewer Review Type Date Requested Status
Michał Sawicz Needs Information
Michael Sheldon (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+248399@code.launchpad.net

Commit message

rotation support for keyboard

Description of the change

rotation support for keyboard

Are there any related MPs required for this MP to build/function as expected? Please list.
It's all in this PPA: https://launchpad.net/~unity-team/+archive/ubuntu/demo-stuff

https://code.launchpad.net/~dandrader/qtmir/supportedOrientations/+merge/242213
https://code.launchpad.net/~dandrader/qtubuntu/shellRotation/+merge/242215
https://code.launchpad.net/~unity-team/unity8/shellRotation/+merge/256497
https://code.launchpad.net/~dandrader/unity-api/shellRotation/+merge/242212

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?
Many people have been doing this for months now.

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

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

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

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/<package-name>) on device or emulator?
Michael Sheldon will run that as part of his review.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

The autopilot emulator needs to be updated to take account of the removal of the orientation helper before this can be merged.

review: Needs Fixing
249. By Daniel d'Andrada

Updated autopilot tests

- Remove code that checked for OrientationHelper as there's no longer
such component

- Lock the test application orienation to primary orientation as the
test code doesn't support rotations.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

> The autopilot emulator needs to be updated to take account of the removal of
> the orientation helper before this can be merged.

Fixed.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Note that I was already getting this failure without shellRotation modifications:
http://paste.ubuntu.com/10857830/

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

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

 * Yes

Did CI run pass? If not, please explain why.

 * Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?

 * Yes (performed test plan on submitter's behalf)

review: Approve
Revision history for this message
Michał Sawicz (saviq) wrote :

Are those changes backwards-compatible? If not, we need to add versioned Breaks/Depends as needed.

review: Needs Information
250. By Michael Zanetti

merge trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Keyboard.qml'
2--- qml/Keyboard.qml 2015-03-26 13:51:37 +0000
3+++ qml/Keyboard.qml 2015-06-02 10:22:27 +0000
4@@ -40,260 +40,230 @@
5 id: fullScreenItem
6 objectName: "fullScreenItem"
7
8+ property bool landscape: width > height
9+
10 property variant input_method: maliit_input_method
11 property variant event_handler: maliit_event_handler
12
13- onHeightChanged: calculateSize();
14-
15- OrientationHelper {
16- id: orientationHelper
17- automaticOrientation: false
18- transitionEnabled: false
19-
20- orientationAngle: Screen.angleBetween(Screen.primaryOrientation, canvas.contentOrientation);
21-
22- onOrientationAngleChanged: {
23- calculateSize();
24- }
25+ onXChanged: fullScreenItem.reportKeyboardVisibleRect();
26+ onYChanged: fullScreenItem.reportKeyboardVisibleRect();
27+ onWidthChanged: fullScreenItem.reportKeyboardVisibleRect();
28+ onHeightChanged: fullScreenItem.reportKeyboardVisibleRect();
29+
30+ Item {
31+ id: canvas
32+ objectName: "ubuntuKeyboard" // Allow us to specify a specific keyboard within autopilot.
33+
34+ anchors.bottom: parent.bottom
35+ anchors.left: parent.left
36+
37+ width: parent.width
38+ height: fullScreenItem.landscape ? (fullScreenItem.height * UI.phoneKeyboardHeightLandscape) + wordRibbon.height
39+ : (fullScreenItem.height * UI.phoneKeyboardHeightPortrait) + wordRibbon.height
40+
41+ property int keypadHeight: height;
42+
43+ visible: true
44+
45+ property bool wordribbon_visible: maliit_word_engine.enabled
46+ onWordribbon_visibleChanged: fullScreenItem.reportKeyboardVisibleRect();
47+
48+ property bool languageMenuShown: false
49+ property bool extendedKeysShown: false
50+
51+ property bool firstShow: true
52+ property bool hidingComplete: false
53+
54+ property string layoutId: "freetext"
55+
56 onXChanged: fullScreenItem.reportKeyboardVisibleRect();
57 onYChanged: fullScreenItem.reportKeyboardVisibleRect();
58 onWidthChanged: fullScreenItem.reportKeyboardVisibleRect();
59 onHeightChanged: fullScreenItem.reportKeyboardVisibleRect();
60
61- Item {
62- id: canvas
63- objectName: "ubuntuKeyboard" // Allow us to specify a specific keyboard within autopilot.
64-
65- anchors.bottom: parent.bottom
66+ MouseArea {
67+ id: swipeArea
68+
69+ property int jumpBackThreshold: units.gu(10)
70+
71 anchors.left: parent.left
72-
73- width: parent.width
74- height: 0
75-
76- property int keypadHeight: height;
77-
78- onRotationChanged: console.log("now rotation has changed!!" + rotation)
79-
80- visible: true
81-
82- property int contentOrientation: maliit_geometry.orientation
83- onContentOrientationChanged: fullScreenItem.reportKeyboardVisibleRect();
84-
85- property bool wordribbon_visible: maliit_word_engine.enabled
86- onWordribbon_visibleChanged: calculateSize();
87-
88- property bool languageMenuShown: false
89- property bool extendedKeysShown: false
90-
91- property bool firstShow: true
92- property bool hidingComplete: false
93-
94- property string layoutId: "freetext"
95-
96- onXChanged: fullScreenItem.reportKeyboardVisibleRect();
97- onYChanged: fullScreenItem.reportKeyboardVisibleRect();
98- onWidthChanged: fullScreenItem.reportKeyboardVisibleRect();
99- onHeightChanged: fullScreenItem.reportKeyboardVisibleRect();
100-
101- MouseArea {
102- id: swipeArea
103-
104- property int jumpBackThreshold: units.gu(10)
105-
106- anchors.left: parent.left
107- anchors.right: parent.right
108- anchors.top: parent.top
109- height: (parent.height - canvas.keypadHeight) + wordRibbon.height +
110- borderTop.height + units.gu(UI.top_margin)
111-
112- drag.target: keyboardSurface
113- drag.axis: Drag.YAxis;
114- drag.minimumY: 0
115- drag.maximumY: parent.height
116- //fix for lp:1277186
117- //only filter children when wordRibbon visible
118- drag.filterChildren: wordRibbon.visible
119- // Avoid conflict with extended key swipe selection
120- enabled: !canvas.extendedKeysShown
121-
122- onReleased: {
123- if (keyboardSurface.y > jumpBackThreshold) {
124- maliit_geometry.shown = false;
125- } else {
126- bounceBackAnimation.from = keyboardSurface.y
127- bounceBackAnimation.start();
128- }
129+ anchors.right: parent.right
130+ anchors.top: parent.top
131+ height: (parent.height - canvas.keypadHeight) + wordRibbon.height +
132+ borderTop.height + units.gu(UI.top_margin)
133+
134+ drag.target: keyboardSurface
135+ drag.axis: Drag.YAxis;
136+ drag.minimumY: 0
137+ drag.maximumY: parent.height
138+ //fix for lp:1277186
139+ //only filter children when wordRibbon visible
140+ drag.filterChildren: wordRibbon.visible
141+ // Avoid conflict with extended key swipe selection
142+ enabled: !canvas.extendedKeysShown
143+
144+ onReleased: {
145+ if (keyboardSurface.y > jumpBackThreshold) {
146+ maliit_geometry.shown = false;
147+ } else {
148+ bounceBackAnimation.from = keyboardSurface.y
149+ bounceBackAnimation.start();
150+ }
151+ }
152+
153+ Item {
154+ id: keyboardSurface
155+ objectName: "keyboardSurface"
156+
157+ x:0
158+ y:0
159+ width: parent.width
160+ height: canvas.height
161+
162+ onXChanged: fullScreenItem.reportKeyboardVisibleRect();
163+ onYChanged: fullScreenItem.reportKeyboardVisibleRect();
164+ onWidthChanged: fullScreenItem.reportKeyboardVisibleRect();
165+ onHeightChanged: fullScreenItem.reportKeyboardVisibleRect();
166+
167+ WordRibbon {
168+ id: wordRibbon
169+ objectName: "wordRibbon"
170+
171+ visible: canvas.wordribbon_visible
172+
173+ anchors.bottom: keyboardComp.top
174+ width: parent.width;
175+
176+ height: canvas.wordribbon_visible ? units.gu(UI.wordribbonHeight) : 0
177+ onHeightChanged: fullScreenItem.reportKeyboardVisibleRect();
178 }
179
180 Item {
181- id: keyboardSurface
182- objectName: "keyboardSurface"
183+ id: keyboardComp
184+ objectName: "keyboardComp"
185
186- x:0
187- y:0
188+ height: canvas.keypadHeight - wordRibbon.height
189 width: parent.width
190- height: canvas.height
191+ anchors.bottom: parent.bottom
192
193- onXChanged: fullScreenItem.reportKeyboardVisibleRect();
194- onYChanged: fullScreenItem.reportKeyboardVisibleRect();
195- onWidthChanged: fullScreenItem.reportKeyboardVisibleRect();
196 onHeightChanged: fullScreenItem.reportKeyboardVisibleRect();
197
198- WordRibbon {
199- id: wordRibbon
200- objectName: "wordRibbon"
201-
202- visible: canvas.wordribbon_visible
203-
204- anchors.bottom: keyboardComp.top
205- width: parent.width;
206-
207- height: canvas.wordribbon_visible ? units.gu(UI.wordribbonHeight) : 0
208- onHeightChanged: calculateSize();
209- }
210-
211- Item {
212- id: keyboardComp
213- objectName: "keyboardComp"
214-
215- height: canvas.keypadHeight - wordRibbon.height
216- width: parent.width
217- anchors.bottom: parent.bottom
218-
219- onHeightChanged: fullScreenItem.reportKeyboardVisibleRect();
220-
221- Rectangle {
222- id: background
223-
224- anchors.fill: parent
225-
226- color: UI.backgroundColor
227- }
228-
229- Image {
230- id: borderTop
231- source: "styles/ubuntu/images/border_top.png"
232- width: parent.width
233- anchors.top: parent.top.bottom
234- }
235-
236- KeyboardContainer {
237- id: keypad
238-
239- anchors.top: borderTop.bottom
240- anchors.bottom: background.bottom
241- anchors.topMargin: units.gu( UI.top_margin )
242- anchors.bottomMargin: units.gu( UI.bottom_margin )
243- width: parent.width
244-
245- onPopoverEnabledChanged: fullScreenItem.reportKeyboardVisibleRect();
246- }
247-
248- LanguageMenu {
249- id: languageMenu
250- objectName: "languageMenu"
251- anchors.centerIn: parent
252- height: contentHeight > keypad.height ? keypad.height : contentHeight
253- width: units.gu(30);
254- enabled: canvas.languageMenuShown
255- visible: canvas.languageMenuShown
256- }
257- } // keyboardComp
258- }
259- }
260-
261- PropertyAnimation {
262- id: bounceBackAnimation
263- target: keyboardSurface
264- properties: "y"
265- easing.type: Easing.OutBounce;
266- easing.overshoot: 2.0
267- to: 0
268- }
269-
270- state: "HIDDEN"
271-
272- states: [
273- State {
274- name: "SHOWN"
275- PropertyChanges { target: keyboardSurface; y: 0; }
276- onCompleted: {
277- canvas.firstShow = false;
278- canvas.hidingComplete = false;
279- }
280- when: maliit_geometry.shown === true
281- },
282-
283- State {
284- name: "HIDDEN"
285- PropertyChanges { target: keyboardSurface; y: canvas.height }
286- onCompleted: {
287- canvas.languageMenuShown = false;
288- keypad.closeExtendedKeys();
289- keypad.activeKeypadState = "NORMAL";
290- keypad.state = "CHARACTERS";
291- maliit_input_method.close();
292- canvas.hidingComplete = true;
293- reportKeyboardVisibleRect();
294- }
295- // Wait for the first show operation to complete before
296- // allowing hiding, as the conditions when the keyboard
297- // has never been visible can trigger a hide operation
298- when: maliit_geometry.shown === false && canvas.firstShow === false
299- }
300- ]
301- transitions: Transition {
302- UbuntuNumberAnimation { target: keyboardSurface; properties: "y"; }
303- }
304-
305- Connections {
306- target: input_method
307- onActivateAutocaps: {
308- if (keypad.state == "CHARACTERS") {
309- keypad.activeKeypadState = "SHIFTED";
310- keypad.autoCapsTriggered = true;
311- } else {
312- keypad.delayedAutoCaps = true;
313- }
314- }
315-
316- onActiveLanguageChanged: {
317- keypad.justChangedLanguage = true
318- }
319- onKeyboardReset: {
320- keypad.state = "CHARACTERS"
321- if (keypad.switchBack && maliit_input_method.previousLanguage && !keypad.justChangedLanguage) {
322- keypad.switchBack = false;
323- maliit_input_method.activeLanguage = maliit_input_method.previousLanguage;
324- }
325- keypad.justChangedLanguage = false;
326- }
327- onDeactivateAutocaps: {
328- if(keypad.autoCapsTriggered) {
329- keypad.activeKeypadState = "NORMAL";
330- keypad.autoCapsTriggered = false;
331- }
332- keypad.delayedAutoCaps = false;
333- }
334- }
335-
336- } // canvas
337- } // OrientationHelper
338-
339- function calculateSize() {
340- // TODO tablet
341- if (orientationHelper.orientationAngle == 270 ||
342- orientationHelper.orientationAngle == 90) {
343- canvas.height = (fullScreenItem.width * UI.phoneKeyboardHeightLandscape) + wordRibbon.height
344- } else if (orientationHelper.orientationAngle == 0 ||
345- orientationHelper.orientationAngle == 180) {
346- canvas.height = (fullScreenItem.height * UI.phoneKeyboardHeightPortrait) + wordRibbon.height
347- } else { // fallback
348- canvas.height = (fullScreenItem.height * UI.phoneKeyboardHeightPortrait) + wordRibbon.height
349- }
350-
351- reportKeyboardVisibleRect();
352- }
353+ Rectangle {
354+ id: background
355+
356+ anchors.fill: parent
357+
358+ color: UI.backgroundColor
359+ }
360+
361+ Image {
362+ id: borderTop
363+ source: "styles/ubuntu/images/border_top.png"
364+ width: parent.width
365+ anchors.top: parent.top.bottom
366+ }
367+
368+ KeyboardContainer {
369+ id: keypad
370+
371+ anchors.top: borderTop.bottom
372+ anchors.bottom: background.bottom
373+ anchors.topMargin: units.gu( UI.top_margin )
374+ anchors.bottomMargin: units.gu( UI.bottom_margin )
375+ width: parent.width
376+
377+ onPopoverEnabledChanged: fullScreenItem.reportKeyboardVisibleRect();
378+ }
379+
380+ LanguageMenu {
381+ id: languageMenu
382+ objectName: "languageMenu"
383+ anchors.centerIn: parent
384+ height: contentHeight > keypad.height ? keypad.height : contentHeight
385+ width: units.gu(30);
386+ enabled: canvas.languageMenuShown
387+ visible: canvas.languageMenuShown
388+ }
389+ } // keyboardComp
390+ }
391+ }
392+
393+ PropertyAnimation {
394+ id: bounceBackAnimation
395+ target: keyboardSurface
396+ properties: "y"
397+ easing.type: Easing.OutBounce;
398+ easing.overshoot: 2.0
399+ to: 0
400+ }
401+
402+ state: "HIDDEN"
403+
404+ states: [
405+ State {
406+ name: "SHOWN"
407+ PropertyChanges { target: keyboardSurface; y: 0; }
408+ onCompleted: {
409+ canvas.firstShow = false;
410+ canvas.hidingComplete = false;
411+ }
412+ when: maliit_geometry.shown === true
413+ },
414+
415+ State {
416+ name: "HIDDEN"
417+ PropertyChanges { target: keyboardSurface; y: canvas.height }
418+ onCompleted: {
419+ canvas.languageMenuShown = false;
420+ keypad.closeExtendedKeys();
421+ keypad.activeKeypadState = "NORMAL";
422+ keypad.state = "CHARACTERS";
423+ maliit_input_method.close();
424+ canvas.hidingComplete = true;
425+ reportKeyboardVisibleRect();
426+ }
427+ // Wait for the first show operation to complete before
428+ // allowing hiding, as the conditions when the keyboard
429+ // has never been visible can trigger a hide operation
430+ when: maliit_geometry.shown === false && canvas.firstShow === false
431+ }
432+ ]
433+ transitions: Transition {
434+ UbuntuNumberAnimation { target: keyboardSurface; properties: "y"; }
435+ }
436+
437+ Connections {
438+ target: input_method
439+ onActivateAutocaps: {
440+ if (keypad.state == "CHARACTERS") {
441+ keypad.activeKeypadState = "SHIFTED";
442+ keypad.autoCapsTriggered = true;
443+ } else {
444+ keypad.delayedAutoCaps = true;
445+ }
446+ }
447+
448+ onActiveLanguageChanged: {
449+ keypad.justChangedLanguage = true
450+ }
451+ onKeyboardReset: {
452+ keypad.state = "CHARACTERS"
453+ if (keypad.switchBack && maliit_input_method.previousLanguage && !keypad.justChangedLanguage) {
454+ keypad.switchBack = false;
455+ maliit_input_method.activeLanguage = maliit_input_method.previousLanguage;
456+ }
457+ keypad.justChangedLanguage = false;
458+ }
459+ onDeactivateAutocaps: {
460+ if(keypad.autoCapsTriggered) {
461+ keypad.activeKeypadState = "NORMAL";
462+ keypad.autoCapsTriggered = false;
463+ }
464+ keypad.delayedAutoCaps = false;
465+ }
466+ }
467+
468+ } // canvas
469
470 function reportKeyboardVisibleRect() {
471
472@@ -304,12 +274,8 @@
473
474 var obj = mapFromItem(keyboardSurface, vx, vy, vwidth, vheight);
475 // Report visible height of the keyboard to support anchorToKeyboard
476- if (canvas.contentOrientation == Qt.InvertedPortraitOrientation) {
477- obj.height += obj.y
478- } else {
479- obj.height = fullScreenItem.height - obj.y;
480- }
481-
482+ obj.height = fullScreenItem.height - obj.y;
483+
484 // Work around QT bug: https://bugreports.qt-project.org/browse/QTBUG-20435
485 // which results in a 0 height being reported incorrectly immediately prior
486 // to the keyboard closing animation starting, which causes us to report
487
488=== modified file 'qml/keys/ActionKey.qml'
489--- qml/keys/ActionKey.qml 2014-09-16 12:39:01 +0000
490+++ qml/keys/ActionKey.qml 2015-06-02 10:22:27 +0000
491@@ -55,7 +55,7 @@
492 name: actionKeyRoot.iconNormal
493 color: actionKeyRoot.colorNormal
494 anchors.centerIn: parent
495- anchors.verticalCenterOffset: orientationHelper.orientationAngle == 0 || orientationHelper.orientationAngle == 180 ? -units.gu(UI.row_margin/2) - units.gu(0.15) : -units.dp( UI.keyMargins )
496+ anchors.verticalCenterOffset: fullScreenItem.landscape ? -units.dp( UI.keyMargins ) : -units.gu(UI.row_margin/2) - units.gu(0.15)
497
498 visible: (label == "")
499 width: units.gu(2.5)
500
501=== modified file 'qml/keys/CharKey.qml'
502--- qml/keys/CharKey.qml 2015-03-09 13:07:56 +0000
503+++ qml/keys/CharKey.qml 2015-06-02 10:22:27 +0000
504@@ -124,7 +124,7 @@
505 anchors.fill: parent
506 anchors.leftMargin: key.leftSide ? (parent.width - panel.keyWidth) + units.dp(UI.keyMargins) : units.dp(UI.keyMargins)
507 anchors.rightMargin: key.rightSide ? (parent.width - panel.keyWidth) + units.dp(UI.keyMargins) : units.dp(UI.keyMargins)
508- anchors.bottomMargin: orientationHelper.orientationAngle == 0 || orientationHelper.orientationAngle == 180 ? units.gu(UI.row_margin) : units.dp( UI.keyMargins ) * 2;
509+ anchors.bottomMargin: fullScreenItem.landscape ? units.dp( UI.keyMargins ) * 2 : units.gu(UI.row_margin);
510 source: key.imgNormal
511
512 BorderImage {
513
514=== modified file 'src/plugin/inputmethod.cpp'
515--- src/plugin/inputmethod.cpp 2015-04-24 14:51:53 +0000
516+++ src/plugin/inputmethod.cpp 2015-06-02 10:22:27 +0000
517@@ -612,10 +612,7 @@
518 {
519 Q_D(InputMethod);
520
521- QRect visibleRect = qGuiApp->primaryScreen()->mapBetween(
522- d->m_geometry->orientation(),
523- qGuiApp->primaryScreen()->primaryOrientation(),
524- d->m_geometry->visibleRect().toRect());
525+ QRect visibleRect = d->m_geometry->visibleRect().toRect();
526
527 d->applicationApiWrapper->reportOSKVisible(
528 visibleRect.x(),
529
530=== modified file 'tests/autopilot/ubuntu-keyboard-tester.desktop'
531--- tests/autopilot/ubuntu-keyboard-tester.desktop 2014-11-20 14:05:05 +0000
532+++ tests/autopilot/ubuntu-keyboard-tester.desktop 2015-06-02 10:22:27 +0000
533@@ -7,3 +7,4 @@
534 Terminal=false
535 X-Ubuntu-Touch=true
536 X-Ubuntu-Single-Instance=true
537+X-Ubuntu-Supported-Orientations=primary
538
539=== modified file 'tests/autopilot/ubuntu_keyboard/emulators/keyboard.py'
540--- tests/autopilot/ubuntu_keyboard/emulators/keyboard.py 2015-04-29 20:01:23 +0000
541+++ tests/autopilot/ubuntu_keyboard/emulators/keyboard.py 2015-06-02 10:22:27 +0000
542@@ -58,19 +58,6 @@
543
544 def __init__(self, pointer=None):
545 try:
546- self.orientation = self.maliit.select_single(
547- "OrientationHelper"
548- )
549- except ValueError as e:
550- e.args += (
551- "More than one OrientationHelper object was found, aborting.",
552- )
553- raise
554- except StateNotFoundError:
555- logger.error("Unable to find the Orientation Helper, aborting.")
556- raise
557-
558- try:
559 self.keyboard = self.maliit.select_single(
560 "QQuickItem",
561 objectName="ubuntuKeyboard"
562@@ -97,8 +84,6 @@
563 self._keys_position = defaultdict(dict)
564 self._keys_contained = defaultdict(dict)
565
566- self._store_current_orientation()
567-
568 if pointer is None:
569 self.pointer = Pointer(Touch.create())
570 else:
571@@ -240,7 +225,6 @@
572 if (
573 need_to_update
574 or self._stored_active_keypad_name != self._current_keypad_name
575- or self._keyboard_details_changed()
576 ):
577 self._stored_active_keypad_name = self._current_keypad_name
578 loader = self.maliit.select_single(
579@@ -340,25 +324,11 @@
580 key_rect.y + key_rect.h / 2.0,
581 rate=2.77 * gu, time_between_events=2)
582
583- def _keyboard_details_changed(self):
584- return self._orientation_changed()
585-
586 def _keypad_details_expired(self, keypad_name):
587 return (
588 self._keys_contained.get(keypad_name) is None
589- or self._keyboard_details_changed()
590 )
591
592- def _orientation_changed(self):
593- if self._stored_orientation != self.orientation.orientationAngle:
594- self._store_current_orientation()
595- return True
596- else:
597- return False
598-
599- def _store_current_orientation(self):
600- self._stored_orientation = self.orientation.orientationAngle
601-
602 def _translate_key(self, label):
603 """Get the label for a 'special key' (i.e. space) so that it can be
604 addressed and clicked.

Subscribers

People subscribed via source and target branches