React properly on show/hide keyboard

This commit is contained in:
Sebastian J. Wolf 2020-09-18 22:55:59 +02:00
parent a361b787c2
commit 3acdf46439
2 changed files with 15 additions and 3 deletions

View file

@ -51,7 +51,7 @@ Page {
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
asynchronous: true asynchronous: true
width: 2/3 * parent.width width: aboutPage.isPortrait ? ( 1/2 * parent.width ) : ( 1/2 * parent.height )
} }

View file

@ -260,7 +260,7 @@ Page {
Row { Row {
id: headerRow id: headerRow
width: parent.width - (3 * Theme.horizontalPageMargin) width: parent.width - (3 * Theme.horizontalPageMargin)
height: chatOverviewColumn.height + ( 2 * Theme.paddingLarge ) height: chatOverviewColumn.height + Theme.paddingLarge
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.paddingMedium spacing: Theme.paddingMedium
@ -316,6 +316,18 @@ Page {
width: parent.width width: parent.width
height: parent.height - Theme.paddingMedium - headerRow.height - ( chatPage.isChannel ? 0 : ( newMessageColumn.height + Theme.paddingMedium ) ) height: parent.height - Theme.paddingMedium - headerRow.height - ( chatPage.isChannel ? 0 : ( newMessageColumn.height + Theme.paddingMedium ) )
property int previousHeight;
Component.onCompleted: {
previousHeight = height;
}
onHeightChanged: {
var deltaHeight = previousHeight - height;
chatView.contentY = chatView.contentY + deltaHeight;
previousHeight = height;
}
Timer { Timer {
id: chatViewLoadingTimer id: chatViewLoadingTimer
interval: 100 interval: 100
@ -655,7 +667,7 @@ Page {
Row { Row {
id: newMessageRow id: newMessageRow
width: parent.width width: parent.width
height: sendMessageColumn.height + ( 2 * Theme.paddingLarge ) height: sendMessageColumn.height + Theme.paddingLarge
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
Column { Column {