-
Notifications
You must be signed in to change notification settings - Fork 2
/
MessageItem.qml
52 lines (43 loc) · 1.25 KB
/
MessageItem.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import QtQuick 2.0
import QtQuick.Layouts 1.0
Item {
property var object
property alias message: root.object
id: root
implicitHeight: layout.implicitHeight + anchors.topMargin + anchors.bottomMargin
//implicitWidth: layout.implicitWidth + anchors.leftMargin + anchors.rightMargin
ColumnLayout {
id: layout
spacing: 2
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
RowLayout {
SelectableText {
id: subject
text: message.header("subject")
elide: Text.ElideRight
Layout.fillWidth: true
clip: true
}
SelectableText {
id: date
text: message.date.toString()
}
}
RowLayout {
spacing: 10
SelectableText {
id: authors
text: message.header("from")
elide: Text.ElideRight
Layout.fillWidth: true
Layout.maximumWidth: implicitWidth
}
TagsView {
tags: message.tags
Layout.fillWidth: true
}
}
}
}