summary refs log tree commit diff
path: root/resources/qml/UserProfile.qml
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-02-03 03:17:28 +0100
committerGitHub <noreply@github.com>2021-02-03 03:17:28 +0100
commita7150b566631df39d154a968d04b19af324b3815 (patch)
treefb8ecf83dadec49096bb06c01684a53ea980d17e /resources/qml/UserProfile.qml
parentfixed global avatar updation in the dialog (diff)
parentCleanup privacy screen, no more grabImage (diff)
downloadnheko-a7150b566631df39d154a968d04b19af324b3815.tar.xz
Merge branch 'master' into avatar_username_feature
Diffstat (limited to 'resources/qml/UserProfile.qml')
-rw-r--r--resources/qml/UserProfile.qml24
1 files changed, 15 insertions, 9 deletions
diff --git a/resources/qml/UserProfile.qml b/resources/qml/UserProfile.qml

index 65c58382..37ae6de8 100644 --- a/resources/qml/UserProfile.qml +++ b/resources/qml/UserProfile.qml
@@ -10,6 +10,8 @@ ApplicationWindow { property var profile + x: MainWindow.x + (MainWindow.width / 2) - (width / 2) + y: MainWindow.y + (MainWindow.height / 2) - (height / 2) height: 650 width: 420 minimumHeight: 420 @@ -17,6 +19,11 @@ ApplicationWindow { color: colors.window title: profile.isGlobalUserProfile ? "Global User Profile" : "Room User Profile" + Shortcut { + sequence: StandardKey.Cancel + onActivated: userProfileDialog.close() + } + ColumnLayout { id: contentL @@ -84,10 +91,9 @@ ApplicationWindow { font.bold: true Layout.alignment: Qt.AlignHCenter selectByMouse: true - onAccepted: { - profile.changeUsername(displayUsername.text) - displayUsername.isUsernameEditingAllowed = false + profile.changeUsername(displayUsername.text); + displayUsername.isUsernameEditingAllowed = false; } ImageButton { @@ -96,18 +102,18 @@ ApplicationWindow { anchors.left: displayUsername.right anchors.verticalCenter: displayUsername.verticalCenter image: displayUsername.isUsernameEditingAllowed ? ":/icons/icons/ui/checkmark.png" : ":/icons/icons/ui/edit.png" - onClicked: { if (displayUsername.isUsernameEditingAllowed) { - profile.changeUsername(displayUsername.text) - displayUsername.isUsernameEditingAllowed = false + profile.changeUsername(displayUsername.text); + displayUsername.isUsernameEditingAllowed = false; } else { - displayUsername.isUsernameEditingAllowed = true - displayUsername.focus = true - displayUsername.selectAll() + displayUsername.isUsernameEditingAllowed = true; + displayUsername.focus = true; + displayUsername.selectAll(); } } } + } MatrixText {