mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
use Rectangle for typing users so it doesn't overlap with the timeline
This commit is contained in:
parent
bfcfa79d53
commit
e49691fe3b
1 changed files with 27 additions and 12 deletions
|
@ -324,18 +324,33 @@ Page {
|
|||
id: footerContent
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Label {
|
||||
id: typingDisplay
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 10
|
||||
anchors.rightMargin: 10
|
||||
|
||||
color: colors.text
|
||||
text: chat.model ? chat.model.formatTypingUsers(chat.model.typingUsers, colors.window) : ""
|
||||
textFormat: Text.RichText
|
||||
}
|
||||
Rectangle {
|
||||
id: typingRect
|
||||
Connections {
|
||||
target: chat.model
|
||||
onTypingUsersChanged: {
|
||||
if (chat.model && chat.model.formatTypingUsers(chat.model.typingUsers,
|
||||
colors.window) === "")
|
||||
typingRect.color = "transparent"
|
||||
else
|
||||
typingRect.color = colors.window
|
||||
}
|
||||
}
|
||||
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 {
|
||||
anchors.left: parent.left
|
||||
|
|
Loading…
Reference in a new issue