2
* Copyright (C) 2013-2014 Canonical Ltd
4
* This file is part of Ubuntu Calendar App
6
* Ubuntu Calendar App is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 3 as
8
* published by the Free Software Foundation.
10
* Ubuntu Calendar App is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
anchors.left: parent.left
24
anchors.right: parent.right
25
anchors.bottom: parent.bottom
26
height: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
31
easing.type: Easing.InOutQuad
38
when: keyboardRect.height == 0
42
when: keyboardRect.height == Qt.inputMethod.keyboardRectangle.height
46
function recursiveFindFocusedItem(parent) {
47
if (parent.activeFocus) {
51
for (var i in parent.children) {
52
var child = parent.children[i];
53
if (child.activeFocus) {
57
var item = recursiveFindFocusedItem(child);
68
target: Qt.inputMethod
71
if (!Qt.inputMethod.visible) {
72
var focusedItem = recursiveFindFocusedItem(keyboardRect.parent);
73
if (focusedItem != null) {
74
focusedItem.focus = false;