mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
MessageView: improve styling of presence status
Significantly reduce the font size as to visually indicate this is additional information and not part of the username or message text. Align the text with the username field besides it. Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
This commit is contained in:
parent
a11b1221a3
commit
6c37f219ba
1 changed files with 3 additions and 0 deletions
|
@ -348,6 +348,7 @@ Item {
|
||||||
}
|
}
|
||||||
property int remainingWidth: chat.delegateMaxWidth - spacing - messageUserAvatar.width
|
property int remainingWidth: chat.delegateMaxWidth - spacing - messageUserAvatar.width
|
||||||
AbstractButton {
|
AbstractButton {
|
||||||
|
id: userNameButton
|
||||||
contentItem: ElidedLabel {
|
contentItem: ElidedLabel {
|
||||||
id: userName_
|
id: userName_
|
||||||
fullText: userName
|
fullText: userName
|
||||||
|
@ -373,12 +374,14 @@ Item {
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: statusMsg
|
id: statusMsg
|
||||||
|
anchors.baseline: userNameButton.baseline
|
||||||
color: Nheko.colors.buttonText
|
color: Nheko.colors.buttonText
|
||||||
text: Presence.userStatus(userId)
|
text: Presence.userStatus(userId)
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
width: userInfo.remainingWidth - userName_.width - parent.spacing
|
width: userInfo.remainingWidth - userName_.width - parent.spacing
|
||||||
font.italic: true
|
font.italic: true
|
||||||
|
font.pointSize: fontMetrics.font.pointSize * 0.8
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Presence
|
target: Presence
|
||||||
|
|
Loading…
Reference in a new issue