fix: fix chat bubble height when considered long text
This commit is contained in:
parent
6b76996bf0
commit
1df42a62ca
|
@ -33,14 +33,14 @@ Item {
|
||||||
|
|
||||||
StyledTextEdit {
|
StyledTextEdit {
|
||||||
id: chatText
|
id: chatText
|
||||||
visible: !root.veryLongChatText || root.readMore
|
visible: !showMoreLoader.active || root.readMore
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
font.pixelSize: Style.current.primaryTextFontSize
|
font.pixelSize: Style.current.primaryTextFontSize
|
||||||
readOnly: true
|
readOnly: true
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
color: Style.current.textColor
|
color: Style.current.textColor
|
||||||
height: root.veryLongChatText && !root.readMore ? 200 : implicitHeight
|
height: root.veryLongChatText && !root.readMore ? Math.min(implicitHeight, 200) : implicitHeight
|
||||||
clip: true
|
clip: true
|
||||||
onLinkActivated: function (link) {
|
onLinkActivated: function (link) {
|
||||||
if(link.startsWith("#")) {
|
if(link.startsWith("#")) {
|
||||||
|
@ -109,7 +109,7 @@ Item {
|
||||||
Loader {
|
Loader {
|
||||||
id: mask
|
id: mask
|
||||||
anchors.fill: chatText
|
anchors.fill: chatText
|
||||||
active: root.veryLongChatText
|
active: showMoreLoader.active
|
||||||
visible: false
|
visible: false
|
||||||
sourceComponent: LinearGradient {
|
sourceComponent: LinearGradient {
|
||||||
start: Qt.point(0, 0)
|
start: Qt.point(0, 0)
|
||||||
|
@ -124,7 +124,7 @@ Item {
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: opMask
|
id: opMask
|
||||||
active: root.veryLongChatText && !root.readMore
|
active: showMoreLoader.active && !root.readMore
|
||||||
anchors.fill: chatText
|
anchors.fill: chatText
|
||||||
sourceComponent: OpacityMask {
|
sourceComponent: OpacityMask {
|
||||||
source: chatText
|
source: chatText
|
||||||
|
|
Loading…
Reference in New Issue