Commit 8c267852 authored by Marco Martin's avatar Marco Martin Committed by Nate Graham

move keyboard positioning in the keyboard itself

there was a behavioral change in qtvirtualkeyboard, where now it
reparents itself to the root item (done by purpose to make sure is
always on top of any overlay), not respecting the parent's geometry
so move it in the kwyboard widget itself

BUG:427934
(cherry picked from commit 87e5b40a)
parent df296d82
......@@ -18,11 +18,65 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 2.5
import QtQuick.VirtualKeyboard 2.1
import org.kde.plasma.core 2.0 as PlasmaCore
InputPanel {
id: inputPanel
property bool activated: false
active: activated && Qt.inputMethod.visible
visible: active
width: parent.width
states: [
State {
name: "visible"
when: inputPanel.active
PropertyChanges {
target: inputPanel
y: inputPanel.parent.height - inputPanel.height
opacity: 1
visible: true
}
},
State {
name: "hidden"
when: !inputPanel.active
PropertyChanges {
target: inputPanel
y: inputPanel.parent.height
opacity: 0
visible:false
}
}
]
transitions: [
Transition {
to: "visible"
ParallelAnimation {
YAnimator {
// 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
from: inputPanel.parent.height
duration: PlasmaCore.Units.longDuration
easing.type: Easing.OutQuad
}
OpacityAnimator {
duration: PlasmaCore.Units.longDuration
easing.type: Easing.OutQuad
}
}
},
Transition {
to: "hidden"
ParallelAnimation {
YAnimator {
duration: PlasmaCore.Units.longDuration
easing.type: Easing.InQuad
}
OpacityAnimator {
duration: PlasmaCore.Units.longDuration
easing.type: Easing.InQuad
}
}
}
]
}
......@@ -339,7 +339,6 @@ PlasmaCore.ColorScope {
PropertyChanges {
target: inputPanel
y: lockScreenRoot.height - inputPanel.height
opacity: 1
}
},
State {
......@@ -351,7 +350,6 @@ PlasmaCore.ColorScope {
PropertyChanges {
target: inputPanel
y: lockScreenRoot.height - lockScreenRoot.height/4
opacity: 0
}
}
]
......@@ -379,11 +377,6 @@ PlasmaCore.ColorScope {
duration: units.longDuration
easing.type: Easing.OutQuad
}
OpacityAnimator {
target: inputPanel
duration: units.longDuration
easing.type: Easing.OutQuad
}
}
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment