Spectral/qml/component/MessageBubble.qml

21 lines
539 B
QML
Raw Normal View History

2018-07-12 01:44:41 +00:00
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
2018-07-12 01:44:41 +00:00
import QtQuick.Controls.Material 2.2
2018-07-10 04:18:21 +00:00
AvatarContainer {
2018-07-10 04:18:21 +00:00
readonly property bool isNotice: eventType === "notice"
id: messageRow
TextDelegate {
maximumWidth: messageListView.width - (!sentByMe ? 40 + messageRow.spacing : 0)
flat: isNotice
highlighted: !sentByMe
timeLabelVisible: Math.abs(time - aboveTime) > 600000 || index == 0
authorLabelVisible: messageRow.avatarVisible
2018-07-10 04:18:21 +00:00
displayText: display
2018-07-10 04:18:21 +00:00
}
}