Make keyboard's 'raisedHeight' to include 'mirror text' height

note: this is necessary becasue all the dialogs rely on 'raisedHeight', so without 'mirror text' they will use wrong keyboard geometry during calculations
This commit is contained in:
Alexander Ivash 2018-03-16 19:50:03 +03:00 committed by Alexander Ivash
parent 3a428bc44f
commit 9ec10bbb7e

View file

@ -26,15 +26,17 @@ Rectangle {
readonly property int keyboardRowHeight: 50 readonly property int keyboardRowHeight: 50
readonly property int keyboardWidth: 480 readonly property int keyboardWidth: 480
readonly property int keyboardHeight: 200
readonly property int mirrorTextHeight: keyboardRowHeight readonly property int mirrorTextHeight: keyboardRowHeight
property bool password: false property bool password: false
property alias mirroredText: mirrorText.text property alias mirroredText: mirrorText.text
property bool showMirrorText: true property bool showMirrorText: true
readonly property int raisedHeight: 200
height: enabled && raised ? raisedHeight + (showMirrorText ? keyboardRowHeight : 0) : 0 readonly property int raisedHeight: keyboardHeight + (showMirrorText ? keyboardRowHeight : 0)
height: enabled && raised ? raisedHeight : 0
visible: enabled && raised visible: enabled && raised
property bool shiftMode: false property bool shiftMode: false
@ -158,7 +160,7 @@ Rectangle {
id: keyboardRect id: keyboardRect
y: showMirrorText ? mirrorTextHeight : 0 y: showMirrorText ? mirrorTextHeight : 0
width: keyboardWidth width: keyboardWidth
height: raisedHeight height: keyboardHeight
color: "#252525" color: "#252525"
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
@ -167,7 +169,7 @@ Rectangle {
Column { Column {
id: columnAlpha id: columnAlpha
width: keyboardWidth width: keyboardWidth
height: raisedHeight height: keyboardHeight
visible: !numeric visible: !numeric
Row { Row {
@ -259,7 +261,7 @@ Rectangle {
Column { Column {
id: columnNumeric id: columnNumeric
width: keyboardWidth width: keyboardWidth
height: raisedHeight height: keyboardHeight
visible: numeric visible: numeric
Row { Row {