From 29e6933b4f5e74670df9d7ce10c1d7a6d7e45a69 Mon Sep 17 00:00:00 2001 From: Black Date: Sun, 9 Feb 2020 00:12:07 -0800 Subject: [PATCH] Fix code wrapping and scrolling again. --- imports/Spectral/Component/Timeline/ImageDelegate.qml | 2 +- imports/Spectral/Component/Timeline/MessageDelegate.qml | 4 ++-- imports/Spectral/Panel/RoomPanel.qml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/imports/Spectral/Component/Timeline/ImageDelegate.qml b/imports/Spectral/Component/Timeline/ImageDelegate.qml index bbfebbd2e..445c18cfb 100644 --- a/imports/Spectral/Component/Timeline/ImageDelegate.qml +++ b/imports/Spectral/Component/Timeline/ImageDelegate.qml @@ -77,7 +77,7 @@ RowLayout { Layout.minimumHeight: 64 Layout.preferredWidth: info.w > maxWidth ? maxWidth : info.w - Layout.preferredHeight: info.w > maxWidth ? (info.h / info.w * maxWidth) : info.h + Layout.preferredHeight: info.w > maxWidth ? (info.h * maxWidth / info.w) : info.h id: img diff --git a/imports/Spectral/Component/Timeline/MessageDelegate.qml b/imports/Spectral/Component/Timeline/MessageDelegate.qml index 4d53f18af..a17a312f3 100644 --- a/imports/Spectral/Component/Timeline/MessageDelegate.qml +++ b/imports/Spectral/Component/Timeline/MessageDelegate.qml @@ -168,7 +168,7 @@ ColumnLayout { Layout.fillWidth: true color: !sentByMe ? MPalette.foreground : "white" - text: "" + (replyVisible ? reply.display : "") + text: "" + (replyVisible ? reply.display : "") font.family: window.font.family selectByMouse: true @@ -202,7 +202,7 @@ ColumnLayout { id: contentLabel - text: "" + display + text: "" + display color: darkBackground ? "white" : MPalette.foreground diff --git a/imports/Spectral/Panel/RoomPanel.qml b/imports/Spectral/Panel/RoomPanel.qml index 3add04a3c..a25a8b7ce 100644 --- a/imports/Spectral/Panel/RoomPanel.qml +++ b/imports/Spectral/Panel/RoomPanel.qml @@ -253,6 +253,8 @@ Item { if (messageListView.contentY < messageListView.originY + 10 || currentRoom.timelineSize < 20) currentRoom.getPreviousContent(50) + + messageListView.positionViewAtBeginning() } } }