telephant/qml/MessageList.qml

37 lines
693 B
QML
Raw Normal View History

2017-08-29 14:28:33 +00:00
import QtQuick 2.4
import QtQuick.Controls 2.1
2017-08-29 05:02:56 +00:00
ListView {
property bool fadeMedia: true
2017-08-29 05:02:56 +00:00
id: view
spacing: 12
clip: true
ScrollBar.vertical: ScrollBar {
width: 12
background: Rectangle {
color: "transparent"
}
2017-08-29 05:02:56 +00:00
}
delegate: MessageDelegate {
fadeMedia: view.fadeMedia
}
2017-08-29 05:02:56 +00:00
Label {
anchors.fill: parent
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
visible: parent.count == 0
text: qsTr("No messages to show yet!")
font.bold: true
}
ScrollHelper {
id: scrollHelper
flickable: view
anchors.fill: view
}
2017-08-29 05:02:56 +00:00
}