Skip to content
Snippets Groups Projects
Unverified Commit 721c315b authored by tastytea's avatar tastytea
Browse files

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. :shrug:
parent 2815ad04
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment