nheko/resources/qml/delegates/FileMessage.qml

58 lines
979 B
QML
Raw Normal View History

2019-10-04 01:10:46 +02:00
import QtQuick 2.6
import QtQuick.Layouts 1.2
2019-10-04 01:10:46 +02:00
Rectangle {
radius: 10
2020-02-03 19:21:03 +01:00
color: colors.base
2019-10-05 23:11:20 +02:00
height: row.height + 24
2019-10-27 22:01:40 +01:00
width: parent ? parent.width : undefined
2019-10-04 01:10:46 +02:00
2019-10-05 23:11:20 +02:00
RowLayout {
2019-10-04 01:10:46 +02:00
id: row
2019-10-05 23:11:20 +02:00
anchors.centerIn: parent
width: parent.width - 24
2019-10-04 01:10:46 +02:00
spacing: 15
Rectangle {
2019-10-05 23:11:20 +02:00
id: button
2019-10-04 01:10:46 +02:00
color: colors.light
radius: 22
height: 44
width: 44
Image {
id: img
anchors.centerIn: parent
source: "qrc:/icons/icons/ui/arrow-pointing-down.png"
fillMode: Image.Pad
}
MouseArea {
anchors.fill: parent
onClicked: timelineManager.timeline.saveMedia(model.data.id)
2019-10-04 01:10:46 +02:00
cursorShape: Qt.PointingHandCursor
}
}
2019-10-05 23:11:20 +02:00
ColumnLayout {
id: col
Text {
Layout.fillWidth: true
text: model.data.body
2019-10-05 23:11:20 +02:00
textFormat: Text.PlainText
elide: Text.ElideRight
2019-10-04 01:10:46 +02:00
color: colors.text
}
2019-10-05 23:11:20 +02:00
Text {
Layout.fillWidth: true
text: model.data.filesize
2019-10-05 23:11:20 +02:00
textFormat: Text.PlainText
elide: Text.ElideRight
2019-10-04 01:10:46 +02:00
color: colors.text
}
}
}
}