diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 3f439439..a7bfe1ef 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -207,7 +207,7 @@ Item { image: ":/icons/icons/ui/people.svg" hoverEnabled: true ToolTip.visible: hovered - ToolTip.text: qsTr("View members of %1").arg(room.roomName) + ToolTip.text: qsTr("View members of %1").arg(room ? room.roomName : "") onClicked: TimelineManager.openRoomMembers(room) } diff --git a/resources/qml/TopBar.qml b/resources/qml/TopBar.qml index 32149cc8..20eff7f3 100644 --- a/resources/qml/TopBar.qml +++ b/resources/qml/TopBar.qml @@ -291,6 +291,7 @@ Pane { userId: e.userId ?? "" userName: e.userName ?? "" encryptionError: e.encryptionError ?? "" + keepFullText: true } ImageButton { diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml index 44da16bf..5b7f70dd 100644 --- a/resources/qml/delegates/MessageDelegate.qml +++ b/resources/qml/delegates/MessageDelegate.qml @@ -12,6 +12,7 @@ Item { id: d required property bool isReply + property bool keepFullText: !isReply property alias child: chooser.child implicitWidth: (chooser.child && chooser.child.implicitWidth) ? chooser.child.implicitWidth : 0 required property double proportionalHeight @@ -68,6 +69,7 @@ Item { body: d.body isOnlyEmoji: d.isOnlyEmoji isReply: d.isReply + keepFullText: d.keepFullText metadataWidth: d.metadataWidth } @@ -81,6 +83,7 @@ Item { body: d.body isOnlyEmoji: d.isOnlyEmoji isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent metadataWidth: d.metadataWidth } @@ -96,6 +99,7 @@ Item { body: d.body isOnlyEmoji: d.isOnlyEmoji isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent metadataWidth: d.metadataWidth } @@ -231,6 +235,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: d.roomName ? qsTr("%2 changed the room name to: %1").arg(d.roomName).arg(d.userName) : qsTr("%1 removed the room name").arg(d.userName) } @@ -244,6 +249,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: d.roomTopic ? qsTr("%2 changed the topic to: %1").arg(d.roomTopic).arg(d.userName): qsTr("%1 removed the topic").arg(d.userName) } @@ -257,6 +263,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: qsTr("%1 changed the room avatar").arg(d.userName) } @@ -270,6 +277,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: qsTr("%1 changed the pinned messages.").arg(d.userName) } @@ -283,6 +291,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: d.relatedEventCacheBuster, room.formatImagePackEvent(d.eventId) } @@ -297,6 +306,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: qsTr("%1 changed the addresses for this room.").arg(d.userName) } @@ -310,6 +320,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: qsTr("%1 changed the parent spaces for this room.").arg(d.userName) } @@ -323,6 +334,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: qsTr("%1 created and configured room: %2").arg(d.userName).arg(room.roomId) } @@ -336,6 +348,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: { switch (d.callType) { @@ -358,6 +371,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: qsTr("%1 answered the call.").arg(d.userName) } @@ -371,6 +385,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: qsTr("%1 ended the call.").arg(d.userName) } @@ -384,6 +399,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: qsTr("%1 is negotiating the call...").arg(d.userName) } @@ -397,6 +413,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: d.relatedEventCacheBuster, room.formatPowerLevelEvent(d.eventId) } @@ -410,6 +427,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: d.relatedEventCacheBuster, room.formatJoinRuleEvent(d.eventId) } @@ -423,6 +441,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: d.relatedEventCacheBuster, room.formatHistoryVisibilityEvent(d.eventId) } @@ -436,6 +455,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: d.relatedEventCacheBuster, room.formatGuestAccessEvent(d.eventId) } @@ -452,6 +472,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent Layout.fillWidth: true formatted: d.relatedEventCacheBuster, room.formatMemberEvent(d.eventId) @@ -475,6 +496,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: "KeyVerificationRequest" } @@ -488,6 +510,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: "KeyVerificationStart" } @@ -501,6 +524,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: "KeyVerificationReady" } @@ -514,6 +538,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: "KeyVerificationCancel" } @@ -527,6 +552,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: "KeyVerificationKey" } @@ -540,6 +566,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: "KeyVerificationMac" } @@ -553,6 +580,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: "KeyVerificationDone" } @@ -566,6 +594,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: "KeyVerificationDone" } @@ -579,6 +608,7 @@ Item { body: formatted isOnlyEmoji: false isReply: d.isReply + keepFullText: d.keepFullText isStateEvent: d.isStateEvent formatted: "KeyVerificationAccept" } diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml index 87eb371a..8962fa52 100644 --- a/resources/qml/delegates/Reply.qml +++ b/resources/qml/delegates/Reply.qml @@ -38,6 +38,7 @@ AbstractButton { property int encryptionError property int relatedEventCacheBuster property int maxWidth + property bool keepFullText: false height: replyContainer.height implicitHeight: replyContainer.height @@ -125,6 +126,7 @@ AbstractButton { enabled: false Layout.fillWidth: true isReply: true + keepFullText: r.keepFullText } } diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml index 6031093e..8658a222 100644 --- a/resources/qml/delegates/TextMessage.qml +++ b/resources/qml/delegates/TextMessage.qml @@ -11,6 +11,7 @@ MatrixText { required property string body required property bool isOnlyEmoji required property bool isReply + required property bool keepFullText required property string formatted property string copyText: selectedText ? getText(selectionStart, selectionEnd) : body property int metadataWidth @@ -36,8 +37,8 @@ MatrixText { " + formatted.replace(/
/g, "").replace(//g, "").replace(/<\/del>/g, "").replace(//g, "").replace(/<\/strike>/g, "") width: parent.width - height: isReply ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight - clip: isReply + height: !keepFullText ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight + clip: !keepFullText selectByMouse: !Settings.mobileMode && !isReply enabled: !Settings.mobileMode font.pointSize: (Settings.enlargeEmojiOnlyMessages && isOnlyEmoji > 0 && isOnlyEmoji < 4) ? Settings.fontSize * 3 : Settings.fontSize