Add maximum width to user name in profile
Layout is: padding | text | margin | button | padding
Therefore we subtract 2x padding, 1x margin and 1x button from
width. And an extra button for some reason. 🤷
This commit is contained in:
parent
2815ad0408
commit
721c315be2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user