moment/src/qml/Chat/Timeline/EventFile.qml

27 lines
651 B
QML
Raw Normal View History

2019-09-15 07:48:53 +10:00
import QtQuick 2.12
import QtQuick.Layouts 1.12
import "../../Base"
HTile {
onLeftClicked: Qt.openUrlExternally(loader.mediaUrl)
2019-09-15 08:52:43 +10:00
onRightClicked: eventDelegate.openContextMenu()
// TODO: have the right URL, not mxc
onHoveredChanged:
eventDelegate.hoveredMediaTypeUrl =
hovered ? [EventDelegate.Media.File, loader.mediaUrl] : []
2019-09-15 07:48:53 +10:00
property EventMediaLoader loader
2019-09-15 07:48:53 +10:00
title.text: loader.singleMediaInfo.media_title || qsTr("Untitled file")
2019-09-15 07:48:53 +10:00
title.elide: Text.ElideMiddle
subtitle.text: CppUtils.formattedBytes(loader.singleMediaInfo.media_size)
2019-09-15 07:48:53 +10:00
image: HIcon {
svgName: "download"
}
}