2021-10-01 15:58:36 +00:00
|
|
|
import QtQuick 2.3
|
|
|
|
import QtQuick.Controls 2.3
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import Qt.labs.platform 1.1
|
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.controls 1.0
|
|
|
|
import shared.panels 1.0
|
2021-10-01 15:58:36 +00:00
|
|
|
|
2022-03-07 14:56:05 +00:00
|
|
|
import StatusQ.Core.Utils 0.1 as StatusQUtils
|
|
|
|
|
2022-09-23 14:14:31 +00:00
|
|
|
Badge {
|
|
|
|
id: root
|
2021-10-01 15:58:36 +00:00
|
|
|
|
2022-05-10 16:04:25 +00:00
|
|
|
property string repliedMessageContent
|
2021-10-01 15:58:36 +00:00
|
|
|
|
2022-09-23 14:14:31 +00:00
|
|
|
signal replyClicked()
|
|
|
|
|
2021-10-01 15:58:36 +00:00
|
|
|
SVGImage {
|
|
|
|
id: replyIcon
|
|
|
|
anchors.left: parent.left
|
2022-09-23 14:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2021-10-01 15:58:36 +00:00
|
|
|
anchors.verticalCenter:parent.verticalCenter
|
2022-09-23 14:14:31 +00:00
|
|
|
width: 16
|
|
|
|
height: width
|
|
|
|
source: Style.svg("reply-small-arrow")
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: arrowArea
|
|
|
|
hoverEnabled: true
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: root.replyClicked()
|
|
|
|
}
|
2021-10-01 15:58:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StyledTextEdit {
|
2022-09-23 14:14:31 +00:00
|
|
|
id: communityNameText
|
2021-10-01 15:58:36 +00:00
|
|
|
width: implicitWidth > 300 ? 300 : implicitWidth
|
2022-09-23 14:14:31 +00:00
|
|
|
height: 18
|
2021-10-01 15:58:36 +00:00
|
|
|
anchors.left: replyIcon.right
|
|
|
|
anchors.leftMargin: 4
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2022-09-23 14:14:31 +00:00
|
|
|
text: Utils.getReplyMessageStyle(StatusQUtils.Emoji.parse(StatusQUtils.Utils.linkifyAndXSS(repliedMessageContent),
|
|
|
|
StatusQUtils.Emoji.size.small), false)
|
2021-10-01 15:58:36 +00:00
|
|
|
readOnly: true
|
2022-09-23 14:14:31 +00:00
|
|
|
textFormat: Text.RichText
|
|
|
|
clip: true
|
|
|
|
font.pixelSize: 13
|
2021-10-01 15:58:36 +00:00
|
|
|
}
|
2022-09-23 14:14:31 +00:00
|
|
|
}
|