use Rectangle for typing users so it doesn't overlap with the timeline

This commit is contained in:
Jussi Kuokkanen 2020-09-17 16:49:56 +03:00
parent bfcfa79d53
commit e49691fe3b

View File

@ -324,18 +324,33 @@ Page {
id: footerContent id: footerContent
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
Rectangle {
Label { id: typingRect
id: typingDisplay Connections {
anchors.left: parent.left target: chat.model
anchors.right: parent.right onTypingUsersChanged: {
anchors.leftMargin: 10 if (chat.model && chat.model.formatTypingUsers(chat.model.typingUsers,
anchors.rightMargin: 10 colors.window) === "")
typingRect.color = "transparent"
color: colors.text else
text: chat.model ? chat.model.formatTypingUsers(chat.model.typingUsers, colors.window) : "" typingRect.color = colors.window
textFormat: Text.RichText }
} }
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 10
anchors.rightMargin: 10
color: "transparent"
height: fontMetrics.height
Label {
id: typingDisplay
anchors.left: parent.left
anchors.right: parent.right
color: colors.text
text: chat.model ? chat.model.formatTypingUsers(chat.model.typingUsers, colors.window) : ""
textFormat: Text.RichText
}
}
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left