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 {
|