linphone-desktop/tests/ui/modules/Linphone/Chat/Event.qml
2016-11-25 17:32:21 +01:00

60 lines
1.3 KiB
QML

import QtQuick 2.7
import Common 1.0
import Linphone 1.0
import Linphone.Styles 1.0
import Utils 1.0
// ===================================================================
Row {
property string _type: {
if ($chatEntry.status === ChatModel.CallStatusSuccess) {
return $chatEntry.isOutgoing ? 'outgoing_call' : 'incoming_call'
}
return ''
}
height: ChatStyle.entry.lineHeight
spacing: ChatStyle.entry.message.extraContent.spacing
Icon {
height: parent.height
icon: _type
iconSize: ChatStyle.entry.event.iconSize
width: ChatStyle.entry.metaWidth
}
Text {
Component {
// Never created.
// Private data for `lupdate`.
Item {
property var i18n: [
QT_TR_NOOP('endCall'),
QT_TR_NOOP('incomingCall'),
QT_TR_NOOP('outgoingCall')
]
}
}
color: ChatStyle.entry.event.text.color
font {
bold: true
pointSize: ChatStyle.entry.event.text.fontSize
}
height: parent.height
text: qsTr(Utils.snakeToCamel(_type))
verticalAlignment: Text.AlignVCenter
}
ActionButton {
height: ChatStyle.entry.lineHeight
icon: 'delete'
iconSize: ChatStyle.entry.deleteIconSize
visible: isHoverEntry()
onClicked: removeEntry()
}
}