summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/MatrixText.qml3
-rw-r--r--resources/qml/TimelineView.qml6
-rw-r--r--resources/qml/delegates/TextMessage.qml2
3 files changed, 7 insertions, 4 deletions
diff --git a/resources/qml/MatrixText.qml b/resources/qml/MatrixText.qml

index 9a4f7348..c83069ec 100644 --- a/resources/qml/MatrixText.qml +++ b/resources/qml/MatrixText.qml
@@ -8,6 +8,9 @@ TextEdit { selectByMouse: true color: colors.text + font.hintingPreference: Font.PreferFullHinting + renderType: Text.NativeRendering + onLinkActivated: { if (/^https:\/\/matrix.to\/#\/(@.*)$/.test(link)) chat.model.openUserProfile(/^https:\/\/matrix.to\/#\/(@.*)$/.exec(link)[1]) else if (/^https:\/\/matrix.to\/#\/(![^\/]*)$/.test(link)) timelineManager.setHistoryView(/^https:\/\/matrix.to\/#\/(!.*)$/.exec(link)[1]) diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 1d7b4a4a..da783a7b 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml
@@ -11,6 +11,8 @@ import "./delegates" import "./emoji" Page { + id: timelineRoot + property var colors: currentActivePalette property var systemInactive: SystemPalette { colorGroup: SystemPalette.Disabled } property var inactiveColors: currentInactivePalette ? currentInactivePalette : systemInactive @@ -88,8 +90,6 @@ Page { } } - id: timelineRoot - Rectangle { anchors.fill: parent color: colors.window @@ -114,7 +114,7 @@ Page { ListView { id: chat - visible: timelineManager.timeline != null + visible: !!timelineManager.timeline cacheBuffer: 400 diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml
index b3c45c36..cc2d2da0 100644 --- a/resources/qml/delegates/TextMessage.qml +++ b/resources/qml/delegates/TextMessage.qml
@@ -4,7 +4,7 @@ MatrixText { property string formatted: model.data.formattedBody text: "<style type=\"text/css\">a { color:"+colors.link+";}</style>" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap'>") width: parent ? parent.width : undefined - height: isReply ? Math.min(chat.height / 8, implicitHeight) : undefined + height: isReply ? Math.round(Math.min(timelineRoot.height / 8, implicitHeight)) : undefined clip: true font.pointSize: (settings.enlargeEmojiOnlyMessages && model.data.isOnlyEmoji > 0 && model.data.isOnlyEmoji < 4) ? settings.fontSize * 3 : settings.fontSize }