summary refs log tree commit diff
path: root/resources/qml/TypingIndicator.qml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/TypingIndicator.qml')
-rw-r--r--resources/qml/TypingIndicator.qml35
1 files changed, 35 insertions, 0 deletions
diff --git a/resources/qml/TypingIndicator.qml b/resources/qml/TypingIndicator.qml
new file mode 100644

index 00000000..239fd662 --- /dev/null +++ b/resources/qml/TypingIndicator.qml
@@ -0,0 +1,35 @@ +import QtQuick 2.9 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.2 +import im.nheko 1.0 + +Item { + property var room: TimelineManager.timeline + + implicitHeight: Math.max(fontMetrics.height * 1.2, typingDisplay.height) + Layout.fillWidth: true + + Rectangle { + id: typingRect + + visible: (room && room.typingUsers.length > 0) + color: colors.base + anchors.fill: parent + z: 3 + + Label { + id: typingDisplay + + anchors.left: parent.left + anchors.leftMargin: 10 + anchors.right: parent.right + anchors.rightMargin: 10 + anchors.bottom: parent.bottom + color: colors.text + text: room ? room.formatTypingUsers(room.typingUsers, colors.base) : "" + textFormat: Text.RichText + } + + } + +}