~ubuntu-branches/ubuntu/vivid/ubuntu-keyboard/vivid-proposed

« back to all changes in this revision

Viewing changes to qml/Keyboard.qml

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Bill Filler, Michael Sheldon
  • Date: 2014-09-02 19:41:04 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20140902194104-8po9huybql72knx4
Tags: 0.99.trunk.phablet2+14.10.20140902.1-0ubuntu1
[ Bill Filler ]
* enable spell checking, word prediction and auto-completion by
  default (LP: #1364351)

[ Michael Sheldon ]
* Wait until the first show operation has given components their
  correct sizes before allowing hiding.

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
            property bool languageMenuShown: false
86
86
            property bool extendedKeysShown: false
87
87
 
 
88
            property bool firstShow: true
 
89
 
88
90
            onXChanged: fullScreenItem.reportKeyboardVisibleRect();
89
91
            onYChanged: fullScreenItem.reportKeyboardVisibleRect();
90
92
            onWidthChanged: fullScreenItem.reportKeyboardVisibleRect();
221
223
                State {
222
224
                    name: "SHOWN"
223
225
                    PropertyChanges { target: keyboardSurface; y: 0; }
 
226
                    onCompleted: {
 
227
                        canvas.firstShow = false;
 
228
                    }
224
229
                    when: maliit_geometry.shown === true
225
230
                },
226
231
 
227
232
                State {
228
233
                    name: "HIDDEN"
229
 
                    PropertyChanges { target: keyboardSurface; y: canvas.height > 0 ? canvas.height : orientationHelper.height; }
 
234
                    PropertyChanges { target: keyboardSurface; y: canvas.height }
230
235
                    onCompleted: {
231
236
                        canvas.languageMenuShown = false;
232
237
                        keypad.closeExtendedKeys();
234
239
                        keypad.state = "CHARACTERS";
235
240
                        maliit_input_method.close();
236
241
                    }
237
 
                    when: maliit_geometry.shown === false
 
242
                    // Wait for the first show operation to complete before
 
243
                    // allowing hiding, as the conditions when the keyboard
 
244
                    // has never been visible can trigger a hide operation
 
245
                    when: maliit_geometry.shown === false && canvas.firstShow === false
238
246
                }
239
247
            ]
240
248
            transitions: Transition {