mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
UserProfile: fix status message overflowing
Also style the "Status:" prefix bold.
This commit is contained in:
parent
7c7a8d2d9a
commit
4c328193ce
1 changed files with 10 additions and 3 deletions
|
@ -179,15 +179,22 @@ ApplicationWindow {
|
|||
|
||||
MatrixText {
|
||||
id: statusMsg
|
||||
text: qsTr("Status: %1").arg(Presence.userStatus(profile.userid))
|
||||
text: updateStatus()
|
||||
visible: Presence.userStatus(profile.userid) != ""
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
font.italic: true
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: TextEdit.AlignHCenter
|
||||
Layout.leftMargin: Nheko.paddingMedium
|
||||
Layout.rightMargin: Nheko.paddingMedium
|
||||
font.pointSize: Math.floor(fontMetrics.font.pointSize * 0.9)
|
||||
|
||||
function updateStatus(){
|
||||
return qsTr("<i><b>Status:</b> %1</i>").arg(Presence.userStatus(profile.userid))
|
||||
}
|
||||
Connections {
|
||||
target: Presence
|
||||
function onPresenceChanged(id) {
|
||||
if (id == profile.userid) statusMsg.text = Presence.userStatus(profile.userid);
|
||||
if (id == profile.userid) statusMsg.text = statusMsg.updateStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue