diff --git a/resources/qml/dialogs/UserProfile.qml b/resources/qml/dialogs/UserProfile.qml
index 5f58f705ef553580c750b9b5bbc77ca22d86a823..60f1eb8daede70039fa86ae2b79ba111a474826b 100644
--- a/resources/qml/dialogs/UserProfile.qml
+++ b/resources/qml/dialogs/UserProfile.qml
@@ -187,6 +187,8 @@ ApplicationWindow {
                     text: qsTr("Room: %1").arg(profile.room ? profile.room.roomName : "")
                     ToolTip.text: qsTr("This is a room-specific profile. The user's name and avatar may be different from their global versions.")
                     ToolTip.visible: ma.hovered
+                    Layout.maximumWidth: parent.parent.width - (parent.spacing * 3) - 16
+                    horizontalAlignment: TextEdit.AlignHCenter
 
                     HoverHandler {
                         id: ma