Skip to content
Snippets Groups Projects
Commit fdcf91f5 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix binding loop and non integer text height

parent 4e7bd20e
No related branches found
No related tags found
No related merge requests found
......@@ -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])
......
......@@ -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
......
......@@ -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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment