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