parent
0d217c0db0
commit
5d9d9a8f2a
|
@ -1,13 +1,13 @@
|
|||
import QtQuick 2.4
|
||||
import QtQuick.Layouts 1.4
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Utils 0.1 as StatusQUtils
|
||||
|
||||
import utils 1.0
|
||||
import shared.controls 1.0
|
||||
import shared.panels 1.0
|
||||
|
||||
import StatusQ.Core.Utils 0.1 as StatusQUtils
|
||||
|
||||
Badge {
|
||||
id: root
|
||||
|
||||
|
@ -15,32 +15,43 @@ Badge {
|
|||
|
||||
signal replyClicked()
|
||||
|
||||
SVGImage {
|
||||
id: replyIcon
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.smallPadding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 16
|
||||
height: width
|
||||
implicitWidth: layout.implicitWidth + layout.anchors.leftMargin + layout.anchors.rightMargin
|
||||
implicitHeight: layout.implicitHeight + layout.anchors.topMargin + layout.anchors.bottomMargin
|
||||
|
||||
RowLayout {
|
||||
id: layout
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
topMargin: 3
|
||||
bottomMargin: 3
|
||||
}
|
||||
|
||||
spacing: 4
|
||||
|
||||
StatusIcon {
|
||||
source: Style.svg("reply-small-arrow")
|
||||
Layout.preferredWidth: 16
|
||||
Layout.preferredHeight: 16
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
anchors.left: replyIcon.right
|
||||
anchors.leftMargin: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: Math.min(implicitWidth, 300)
|
||||
text: repliedMessageContent
|
||||
maximumLineCount: 1
|
||||
wrapMode: Text.Wrap
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: 13
|
||||
Layout.maximumWidth: 300
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: replyArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
anchors.fill: layout
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root.replyClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue