mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Merge pull request #924 from tastytea/wrap-room-name
Allow room name in room settings to wrap
This commit is contained in:
commit
19e2527b4b
2 changed files with 8 additions and 1 deletions
|
@ -100,7 +100,8 @@ ApplicationWindow {
|
||||||
MatrixText {
|
MatrixText {
|
||||||
text: roomSettings.roomName
|
text: roomSettings.roomName
|
||||||
font.pixelSize: fontMetrics.font.pixelSize * 2
|
font.pixelSize: fontMetrics.font.pixelSize * 2
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.fillWidth: true
|
||||||
|
horizontalAlignment: TextEdit.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixText {
|
MatrixText {
|
||||||
|
|
|
@ -138,6 +138,9 @@ ApplicationWindow {
|
||||||
color: TimelineManager.userColor(profile.userid, Nheko.colors.window)
|
color: TimelineManager.userColor(profile.userid, Nheko.colors.window)
|
||||||
font.bold: true
|
font.bold: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
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
|
selectByMouse: true
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
profile.changeUsername(displayUsername.text);
|
profile.changeUsername(displayUsername.text);
|
||||||
|
@ -145,6 +148,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageButton {
|
ImageButton {
|
||||||
|
id: usernameChangeButton
|
||||||
visible: profile.isSelf
|
visible: profile.isSelf
|
||||||
anchors.leftMargin: Nheko.paddingSmall
|
anchors.leftMargin: Nheko.paddingSmall
|
||||||
anchors.left: displayUsername.right
|
anchors.left: displayUsername.right
|
||||||
|
@ -183,6 +187,8 @@ ApplicationWindow {
|
||||||
text: qsTr("Room: %1").arg(profile.room ? profile.room.roomName : "")
|
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.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
|
ToolTip.visible: ma.hovered
|
||||||
|
Layout.maximumWidth: parent.parent.width - (parent.spacing * 3) - 16
|
||||||
|
horizontalAlignment: TextEdit.AlignHCenter
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
id: ma
|
id: ma
|
||||||
|
|
Loading…
Reference in a new issue