summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2022-02-05 18:16:35 +0100
committerGitHub <noreply@github.com>2022-02-05 18:16:35 +0100
commit19e2527b4b88dd07a4df957a8c7d4412aabbf823 (patch)
tree16054fed7f6a2013d09797dff520f87e24c294f0
parent# should be valid in links (diff)
parentAdd maximum width to room name in user profile (diff)
downloadnheko-19e2527b4b88dd07a4df957a8c7d4412aabbf823.tar.xz
Merge pull request #924 from tastytea/wrap-room-name
Allow room name in room settings to wrap
-rw-r--r--resources/qml/dialogs/RoomSettings.qml3
-rw-r--r--resources/qml/dialogs/UserProfile.qml6
2 files changed, 8 insertions, 1 deletions
diff --git a/resources/qml/dialogs/RoomSettings.qml b/resources/qml/dialogs/RoomSettings.qml

index 48d2e2b7..fad7b4c7 100644 --- a/resources/qml/dialogs/RoomSettings.qml +++ b/resources/qml/dialogs/RoomSettings.qml
@@ -100,7 +100,8 @@ ApplicationWindow { MatrixText { text: roomSettings.roomName font.pixelSize: fontMetrics.font.pixelSize * 2 - Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true + horizontalAlignment: TextEdit.AlignHCenter } MatrixText { diff --git a/resources/qml/dialogs/UserProfile.qml b/resources/qml/dialogs/UserProfile.qml
index 73c4e68b..60f1eb8d 100644 --- a/resources/qml/dialogs/UserProfile.qml +++ b/resources/qml/dialogs/UserProfile.qml
@@ -138,6 +138,9 @@ ApplicationWindow { color: TimelineManager.userColor(profile.userid, Nheko.colors.window) font.bold: true Layout.alignment: Qt.AlignHCenter + Layout.maximumWidth: parent.width - (Nheko.paddingSmall * 2) - usernameChangeButton.anchors.leftMargin - (usernameChangeButton.width * 2) + horizontalAlignment: TextInput.AlignHCenter + wrapMode: TextInput.Wrap selectByMouse: true onAccepted: { profile.changeUsername(displayUsername.text); @@ -145,6 +148,7 @@ ApplicationWindow { } ImageButton { + id: usernameChangeButton visible: profile.isSelf anchors.leftMargin: Nheko.paddingSmall anchors.left: displayUsername.right @@ -183,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