From cd998d1c35d9d65aa04ca64f0f94f34a57db8335 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Sat, 16 Jan 2021 15:33:33 -0500 Subject: Center user info dialog on the screen --- resources/qml/UserProfile.qml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'resources/qml/UserProfile.qml') diff --git a/resources/qml/UserProfile.qml b/resources/qml/UserProfile.qml index 8328f4a5..fce6e6ff 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 -- cgit 1.5.1 From 58dc79074c3fc8f94857af128c1021486deb22e2 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Fri, 29 Jan 2021 18:18:39 -0500 Subject: Close user profile dialog on Esc --- resources/qml/UserProfile.qml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'resources/qml/UserProfile.qml') diff --git a/resources/qml/UserProfile.qml b/resources/qml/UserProfile.qml index fce6e6ff..a1fbfa41 100644 --- a/resources/qml/UserProfile.qml +++ b/resources/qml/UserProfile.qml @@ -18,6 +18,11 @@ ApplicationWindow { palette: colors color: colors.window + Shortcut { + sequence: StandardKey.Cancel + onActivated: userProfileDialog.close() + } + ColumnLayout { id: contentL -- cgit 1.5.1 From 2bfd44755ea9c18ee9fc48e775b97f0363c9acd4 Mon Sep 17 00:00:00 2001 From: Joseph Donofry Date: Tue, 2 Feb 2021 11:37:10 -0500 Subject: Try to fix format script and fix linting --- .ci/format.sh | 4 ++-- resources/qml/PrivacyScreen.qml | 8 ++++---- resources/qml/UserProfile.qml | 17 ++++++++--------- 3 files changed, 14 insertions(+), 15 deletions(-) (limited to 'resources/qml/UserProfile.qml') diff --git a/.ci/format.sh b/.ci/format.sh index f2d01cec..31eba878 100755 --- a/.ci/format.sh +++ b/.ci/format.sh @@ -14,13 +14,13 @@ do clang-format -i "$f" done; -QMLFORMAT_PATH=$(which qmlformat) +QMLFORMAT_PATH=$(command -v qmlformat) if [ -n "$QMLFORMAT_PATH" ]; then QML_FILES=$(find resources -type f -iname "*.qml") for f in $QML_FILES do - qmlformat -i "$f" + $QMLFORMAT_PATH -i "$f" done; else echo "qmlformat not found; skipping qml formatting" diff --git a/resources/qml/PrivacyScreen.qml b/resources/qml/PrivacyScreen.qml index f3e388ce..98c802a0 100644 --- a/resources/qml/PrivacyScreen.qml +++ b/resources/qml/PrivacyScreen.qml @@ -18,9 +18,9 @@ Item { screenSaverTimer.stop(); screenSaver.state = "Invisible"; } else { - if (timelineRoot.visible) { + if (timelineRoot.visible) screenSaverTimer.start(); - } + } } } @@ -31,12 +31,12 @@ Item { interval: screenTimeout * 1000 running: true onTriggered: { - if (MainWindow.visible) { + if (MainWindow.visible) timelineRoot.grabToImage(function(result) { screenSaver.state = "Visible"; imageSource = result.url; }, Qt.size(width, height)); - } + } } diff --git a/resources/qml/UserProfile.qml b/resources/qml/UserProfile.qml index 4cb9eb10..4a402b69 100644 --- a/resources/qml/UserProfile.qml +++ b/resources/qml/UserProfile.qml @@ -53,10 +53,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 { @@ -65,18 +64,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 { -- cgit 1.5.1