diff options
author | Joseph Donofry <joedonofry@gmail.com> | 2021-02-02 11:37:10 -0500 |
---|---|---|
committer | Joseph Donofry <joedonofry@gmail.com> | 2021-02-02 11:37:10 -0500 |
commit | 2bfd44755ea9c18ee9fc48e775b97f0363c9acd4 (patch) | |
tree | 04bc03bceab7907d0aceca35fa92986af10cffe0 /resources | |
parent | Change bash variable check (diff) | |
download | nheko-2bfd44755ea9c18ee9fc48e775b97f0363c9acd4.tar.xz |
Try to fix format script and fix linting
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/PrivacyScreen.qml | 8 | ||||
-rw-r--r-- | resources/qml/UserProfile.qml | 17 |
2 files changed, 12 insertions, 13 deletions
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 { |