2023-02-22 01:48:49 +03:00
|
|
|
// SPDX-FileCopyrightText: Nheko Contributors
|
2021-03-07 07:57:56 +03:00
|
|
|
//
|
2021-03-05 02:35:15 +03:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2021-01-12 17:03:39 +03:00
|
|
|
import QtQuick 2.9
|
2020-10-26 16:57:54 +03:00
|
|
|
import QtQuick.Controls 2.3
|
2021-01-12 17:03:39 +03:00
|
|
|
import QtQuick.Layouts 1.2
|
2020-10-26 16:57:54 +03:00
|
|
|
import im.nheko 1.0
|
|
|
|
|
|
|
|
Item {
|
|
|
|
implicitHeight: Math.max(fontMetrics.height * 1.2, typingDisplay.height)
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: typingRect
|
|
|
|
|
|
|
|
visible: (room && room.typingUsers.length > 0)
|
2023-06-02 02:29:05 +03:00
|
|
|
color: palette.base
|
2020-10-26 16:57:54 +03:00
|
|
|
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
|
2023-06-02 02:29:05 +03:00
|
|
|
color: palette.text
|
|
|
|
text: room ? room.formatTypingUsers(room.typingUsers, palette.base) : ""
|
2020-10-26 16:57:54 +03:00
|
|
|
textFormat: Text.RichText
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|