moment/src/qml/Chat/TypingMembersBar.qml

42 lines
947 B
QML
Raw Normal View History

2019-07-08 13:52:41 +10:00
// Copyright 2019 miruka
// This file is part of harmonyqml, licensed under LGPLv3.
import QtQuick 2.12
import QtQuick.Layouts 1.12
import "../Base"
2019-04-15 06:12:07 +10:00
HRectangle {
id: typingMembersBar
2019-07-07 07:29:32 +10:00
property alias label: typingLabel
color: theme.chat.typingMembers.background
2019-07-16 18:54:12 +10:00
implicitHeight: typingLabel.text ? typingLabel.height : 0
2019-07-07 07:35:51 +10:00
Behavior on implicitHeight { HNumberAnimation {} }
2019-07-16 18:54:12 +10:00
HRowLayout {
2019-07-07 07:29:32 +10:00
spacing: 8
2019-07-16 18:54:12 +10:00
anchors.fill: parent
Layout.leftMargin: spacing
Layout.rightMargin: spacing
Layout.topMargin: 2
Layout.bottomMargin: 2
2019-07-07 07:29:32 +10:00
HIcon {
id: icon
2019-07-07 07:29:32 +10:00
svgName: "typing" // TODO: animate
height: typingLabel.height
}
2019-04-15 06:12:07 +10:00
2019-07-07 07:29:32 +10:00
HLabel {
id: typingLabel
text: chatPage.roomInfo.typingText
textFormat: Text.StyledText
elide: Text.ElideRight
2019-07-16 18:54:12 +10:00
Layout.fillWidth: true
2019-07-07 07:29:32 +10:00
}
2019-04-15 06:12:07 +10:00
}
}