Warning, /plasma/plasma-workspace/lookandfeel/components/VirtualKeyboard.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2017 Martin Gräßlin <mgraesslin@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 import QtQuick 2.15
0008 import QtQuick.VirtualKeyboard 2.4
0009 
0010 import org.kde.kirigami 2.20 as Kirigami
0011 
0012 InputPanel {
0013     id: inputPanel
0014     property bool activated: false
0015     active: activated && Qt.inputMethod.visible
0016     width: parent.width
0017 
0018     states: [
0019         State {
0020             name: "visible"
0021             when: inputPanel.active
0022             PropertyChanges {
0023                 target: inputPanel
0024                 y: inputPanel.parent.height - inputPanel.height
0025                 opacity: 1
0026                 visible: true
0027             }
0028         },
0029         State {
0030             name: "hidden"
0031             when: !inputPanel.active
0032             PropertyChanges {
0033                 target: inputPanel
0034                 y: inputPanel.parent.height
0035                 opacity: 0
0036                 visible:false
0037             }
0038         }
0039     ]
0040 
0041     transitions: [
0042         Transition {
0043             to: "visible"
0044             ParallelAnimation {
0045                 YAnimator {
0046                     // NOTE this is necessary as otherwise the keyboard always starts the transition with Y as 0, due to the internal reparenting happening when becomes active
0047                     from: inputPanel.parent.height
0048                     duration: Kirigami.Units.longDuration
0049                     easing.type: Easing.OutQuad
0050                 }
0051                 OpacityAnimator {
0052                     duration: Kirigami.Units.longDuration
0053                     easing.type: Easing.OutQuad
0054                 }
0055             }
0056         },
0057         Transition {
0058             to: "hidden"
0059             ParallelAnimation {
0060                 YAnimator {
0061                     duration: Kirigami.Units.longDuration
0062                     easing.type: Easing.InQuad
0063                 }
0064                 OpacityAnimator {
0065                     duration: Kirigami.Units.longDuration
0066                     easing.type: Easing.InQuad
0067                 }
0068             }
0069         }
0070     ]
0071 }