2022-11-16 17:17:38 +00:00
|
|
|
import QtQuick 2.4
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
2021-10-01 15:58:36 +00:00
|
|
|
|
|
|
|
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
|
2022-11-16 17:17:38 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2022-09-23 14:14:31 +00:00
|
|
|
width: 16
|
|
|
|
height: width
|
|
|
|
source: Style.svg("reply-small-arrow")
|
2021-10-01 15:58:36 +00:00
|
|
|
}
|
|
|
|
|
2022-11-16 17:17:38 +00:00
|
|
|
StatusBaseText {
|
2021-10-01 15:58:36 +00:00
|
|
|
anchors.left: replyIcon.right
|
|
|
|
anchors.leftMargin: 4
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2022-11-16 17:17:38 +00:00
|
|
|
width: Math.min(implicitWidth, 300)
|
|
|
|
text: repliedMessageContent
|
|
|
|
maximumLineCount: 1
|
|
|
|
elide: Text.ElideRight
|
2022-09-23 14:14:31 +00:00
|
|
|
font.pixelSize: 13
|
2022-10-29 07:17:35 +00:00
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: replyArea
|
|
|
|
hoverEnabled: true
|
|
|
|
anchors.fill: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: root.replyClicked()
|
|
|
|
}
|
2021-10-01 15:58:36 +00:00
|
|
|
}
|
2022-09-23 14:14:31 +00:00
|
|
|
}
|