Debian Codegraph @

resources/qml/TypingIndicator.qml

raw
1 // SPDX-FileCopyrightText: Nheko Contributors
2 //
3 // SPDX-License-Identifier: GPL-3.0-or-later
4
5 import QtQuick 2.9
6 import QtQuick.Controls 2.3
7 import QtQuick.Layouts 1.2
8
9 Item {
10 Layout.fillWidth: true
11 implicitHeight: Math.max(fontMetrics.height * 1.2, typingDisplay.height)
12
13 Rectangle {
14 id: typingRect
15
16 anchors.fill: parent
17 color: palette.base
18 visible: (room && room.typingUsers.length > 0)
19 z: 3
20
21 Label {
22 id: typingDisplay
23
24 anchors.bottom: parent.bottom
25 anchors.left: parent.left
26 anchors.leftMargin: 10
27 anchors.right: parent.right
28 anchors.rightMargin: 10
29 color: palette.text
30 text: room ? room.formatTypingUsers(room.typingUsers, palette.base) : ""
31 textFormat: Text.RichText
32 }
33 }
34 }