add height of keyboard rectangle for height calculations of some messages

This commit is contained in:
Malte E 2022-03-22 20:33:14 +01:00
parent 4495ad8e55
commit adb706a7e9
4 changed files with 4 additions and 3 deletions

View file

@ -23,6 +23,7 @@ Item {
property var room: null
property var roomPreview: null
property bool showBackButton: false
property int fullHeight: height+Qt.inputMethod.keyboardRectangle.height
Label {
visible: !room && !TimelineManager.isInitialSync && (!roomPreview || !roomPreview.roomid)

View file

@ -21,7 +21,7 @@ Item {
property int tempWidth: originalWidth < 1? 400: originalWidth
implicitWidth: Math.round(tempWidth*Math.min((timelineView.height/divisor)/(tempWidth*proportionalHeight), 1))
implicitWidth: Math.round(tempWidth*Math.min((timelineView.fullHeight/divisor)/(tempWidth*proportionalHeight), 1))
width: Math.min(parent.width,implicitWidth)
height: width*proportionalHeight

View file

@ -25,7 +25,7 @@ Item {
required property string filesize
property double divisor: isReply ? 4 : 2
property int tempWidth: originalWidth < 1? 400: originalWidth
implicitWidth: type == MtxEvent.VideoMessage ? Math.round(tempWidth*Math.min((timelineView.height/divisor)/(tempWidth*proportionalHeight), 1)) : 500
implicitWidth: type == MtxEvent.VideoMessage ? Math.round(tempWidth*Math.min((timelineView.fullHeight/divisor)/(tempWidth*proportionalHeight), 1)) : 500
width: Math.min(parent.width, implicitWidth)
height: (type == MtxEvent.VideoMessage ? width*proportionalHeight : 80) + fileInfoLabel.height
implicitHeight: height

View file

@ -36,7 +36,7 @@ MatrixText {
</style>
" + formatted.replace(/<pre>/g, "<pre style='white-space: pre-wrap; background-color: " + Nheko.colors.alternateBase + "'>").replace(/<del>/g, "<s>").replace(/<\/del>/g, "</s>").replace(/<strike>/g, "<s>").replace(/<\/strike>/g, "</s>")
width: parent.width
height: isReply ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight
height: isReply ? Math.round(Math.min(timelineView.fullHeight / 8, implicitHeight)) : implicitHeight
clip: isReply
selectByMouse: !Settings.mobileMode && !isReply
font.pointSize: (Settings.enlargeEmojiOnlyMessages && isOnlyEmoji > 0 && isOnlyEmoji < 4) ? Settings.fontSize * 3 : Settings.fontSize