mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Try to fix format script and fix linting
This commit is contained in:
parent
08dbdac3b7
commit
2bfd44755e
3 changed files with 14 additions and 15 deletions
|
@ -14,13 +14,13 @@ do
|
||||||
clang-format -i "$f"
|
clang-format -i "$f"
|
||||||
done;
|
done;
|
||||||
|
|
||||||
QMLFORMAT_PATH=$(which qmlformat)
|
QMLFORMAT_PATH=$(command -v qmlformat)
|
||||||
if [ -n "$QMLFORMAT_PATH" ]; then
|
if [ -n "$QMLFORMAT_PATH" ]; then
|
||||||
QML_FILES=$(find resources -type f -iname "*.qml")
|
QML_FILES=$(find resources -type f -iname "*.qml")
|
||||||
|
|
||||||
for f in $QML_FILES
|
for f in $QML_FILES
|
||||||
do
|
do
|
||||||
qmlformat -i "$f"
|
$QMLFORMAT_PATH -i "$f"
|
||||||
done;
|
done;
|
||||||
else
|
else
|
||||||
echo "qmlformat not found; skipping qml formatting"
|
echo "qmlformat not found; skipping qml formatting"
|
||||||
|
|
|
@ -18,9 +18,9 @@ Item {
|
||||||
screenSaverTimer.stop();
|
screenSaverTimer.stop();
|
||||||
screenSaver.state = "Invisible";
|
screenSaver.state = "Invisible";
|
||||||
} else {
|
} else {
|
||||||
if (timelineRoot.visible) {
|
if (timelineRoot.visible)
|
||||||
screenSaverTimer.start();
|
screenSaverTimer.start();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,12 +31,12 @@ Item {
|
||||||
interval: screenTimeout * 1000
|
interval: screenTimeout * 1000
|
||||||
running: true
|
running: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (MainWindow.visible) {
|
if (MainWindow.visible)
|
||||||
timelineRoot.grabToImage(function(result) {
|
timelineRoot.grabToImage(function(result) {
|
||||||
screenSaver.state = "Visible";
|
screenSaver.state = "Visible";
|
||||||
imageSource = result.url;
|
imageSource = result.url;
|
||||||
}, Qt.size(width, height));
|
}, Qt.size(width, height));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,9 @@ ApplicationWindow {
|
||||||
font.bold: true
|
font.bold: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
profile.changeUsername(displayUsername.text)
|
profile.changeUsername(displayUsername.text);
|
||||||
displayUsername.isUsernameEditingAllowed = false
|
displayUsername.isUsernameEditingAllowed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageButton {
|
ImageButton {
|
||||||
|
@ -65,18 +64,18 @@ ApplicationWindow {
|
||||||
anchors.left: displayUsername.right
|
anchors.left: displayUsername.right
|
||||||
anchors.verticalCenter: displayUsername.verticalCenter
|
anchors.verticalCenter: displayUsername.verticalCenter
|
||||||
image: displayUsername.isUsernameEditingAllowed ? ":/icons/icons/ui/checkmark.png" : ":/icons/icons/ui/edit.png"
|
image: displayUsername.isUsernameEditingAllowed ? ":/icons/icons/ui/checkmark.png" : ":/icons/icons/ui/edit.png"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (displayUsername.isUsernameEditingAllowed) {
|
if (displayUsername.isUsernameEditingAllowed) {
|
||||||
profile.changeUsername(displayUsername.text)
|
profile.changeUsername(displayUsername.text);
|
||||||
displayUsername.isUsernameEditingAllowed = false
|
displayUsername.isUsernameEditingAllowed = false;
|
||||||
} else {
|
} else {
|
||||||
displayUsername.isUsernameEditingAllowed = true
|
displayUsername.isUsernameEditingAllowed = true;
|
||||||
displayUsername.focus = true
|
displayUsername.focus = true;
|
||||||
displayUsername.selectAll()
|
displayUsername.selectAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixText {
|
MatrixText {
|
||||||
|
|
Loading…
Reference in a new issue