fix: fix chat bubble height when considered long text

This commit is contained in:
Jonathan Rainville 2021-01-05 14:35:31 -05:00 committed by Iuri Matias
parent 6b76996bf0
commit 1df42a62ca
1 changed files with 4 additions and 4 deletions

View File

@ -33,14 +33,14 @@ Item {
StyledTextEdit {
id: chatText
visible: !root.veryLongChatText || root.readMore
visible: !showMoreLoader.active || root.readMore
textFormat: Text.RichText
wrapMode: Text.Wrap
font.pixelSize: Style.current.primaryTextFontSize
readOnly: true
selectByMouse: true
color: Style.current.textColor
height: root.veryLongChatText && !root.readMore ? 200 : implicitHeight
height: root.veryLongChatText && !root.readMore ? Math.min(implicitHeight, 200) : implicitHeight
clip: true
onLinkActivated: function (link) {
if(link.startsWith("#")) {
@ -109,7 +109,7 @@ Item {
Loader {
id: mask
anchors.fill: chatText
active: root.veryLongChatText
active: showMoreLoader.active
visible: false
sourceComponent: LinearGradient {
start: Qt.point(0, 0)
@ -124,7 +124,7 @@ Item {
Loader {
id: opMask
active: root.veryLongChatText && !root.readMore
active: showMoreLoader.active && !root.readMore
anchors.fill: chatText
sourceComponent: OpacityMask {
source: chatText