summary refs log tree commit diff
path: root/resources/qml/UserProfile.qml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/UserProfile.qml')
-rw-r--r--resources/qml/UserProfile.qml22
1 files changed, 15 insertions, 7 deletions
diff --git a/resources/qml/UserProfile.qml b/resources/qml/UserProfile.qml

index 0ced5498..5e577099 100644 --- a/resources/qml/UserProfile.qml +++ b/resources/qml/UserProfile.qml
@@ -42,15 +42,23 @@ ApplicationWindow { color: TimelineManager.userColor(profile.userid, colors.window) font.bold: true Layout.alignment: Qt.AlignHCenter - focus: true + selectByMouse: true - onEditingFinished: profile.changeUsername(displayUsername.text) + Keys.priority: Keys.BeforeItem + Keys.onReturnPressed: profile.changeUsername(displayUsername.text) - MouseArea { - enabled: !profile.isUsernameEditingAllowed - anchors.fill: parent - onDoubleClicked: { - profile.allowUsernameEditing(true) + ImageButton { + anchors.leftMargin: 5 + anchors.left: displayUsername.right + anchors.verticalCenter: displayUsername.verticalCenter + image: profile.isUsernameEditingAllowed ? ":/icons/icons/ui/checkmark.png" : ":/icons/icons/ui/edit.png" + + onClicked: { + if(profile.isUsernameEditingAllowed) { + profile.changeUsername(displayUsername.text) + }else{ + profile.allowUsernameEditing(true) + } } } }