diff options
-rwxr-xr-x | .ci/format.sh | 4 | ||||
-rw-r--r-- | resources/qml/PrivacyScreen.qml | 8 | ||||
-rw-r--r-- | resources/qml/UserProfile.qml | 17 |
3 files changed, 14 insertions, 15 deletions
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 { |