mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix formatting
This commit is contained in:
parent
0794f0a3fd
commit
cb93ac3402
5 changed files with 44 additions and 27 deletions
|
@ -14,4 +14,14 @@ do
|
|||
clang-format -i "$f"
|
||||
done;
|
||||
|
||||
QMLFORMAT_PATH=$(which qmlformat)
|
||||
if [ ! -z "$QMLFORMAT_PATH" ]; then
|
||||
QML_FILES=$(find resources -type f -iname "*.qml")
|
||||
|
||||
for f in $QML_FILES
|
||||
do
|
||||
qmlformat -i "$f"
|
||||
done;
|
||||
fi
|
||||
|
||||
git diff --exit-code
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick 2.12
|
||||
|
||||
Item {
|
||||
property var timelineRoot
|
||||
property var imageSource
|
||||
property int screenTimeout
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
Timer {
|
||||
id: screenSaverTimer
|
||||
|
||||
interval: screenTimeout * 1000
|
||||
running: true
|
||||
onTriggered: {
|
||||
timelineRoot.grabToImage(function(result) {
|
||||
imageSource = result.url;
|
||||
screenSaver.visible = true
|
||||
particles.resume()
|
||||
}, Qt.size(width, height))
|
||||
screenSaver.visible = true;
|
||||
particles.resume();
|
||||
}, Qt.size(width, height));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,13 +36,15 @@ Item {
|
|||
|
||||
Rectangle {
|
||||
id: screenSaver
|
||||
|
||||
anchors.fill: parent
|
||||
visible: false
|
||||
color: "transparent"
|
||||
|
||||
Image {
|
||||
id: image
|
||||
visible : screenSaver.visible
|
||||
|
||||
visible: screenSaver.visible
|
||||
anchors.fill: parent
|
||||
source: imageSource
|
||||
}
|
||||
|
@ -50,11 +54,12 @@ Item {
|
|||
|
||||
sourceItem: image
|
||||
anchors.fill: image
|
||||
sourceRect: Qt.rect(0,0, width, height)
|
||||
sourceRect: Qt.rect(0, 0, width, height)
|
||||
}
|
||||
|
||||
FastBlur{
|
||||
FastBlur {
|
||||
id: blur
|
||||
|
||||
anchors.fill: effectSource
|
||||
source: effectSource
|
||||
radius: 50
|
||||
|
@ -67,8 +72,10 @@ Item {
|
|||
onClicked: {
|
||||
screenSaver.visible = false;
|
||||
screenSaverTimer.restart();
|
||||
mouse.accepted = false
|
||||
mouse.accepted = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -189,6 +189,7 @@ Page {
|
|||
|
||||
ColumnLayout {
|
||||
id: timelineLayout
|
||||
|
||||
visible: TimelineManager.timeline != null
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
|
|
@ -1168,9 +1168,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
|
|||
connect(privacyScreenTimeout_,
|
||||
qOverload<int>(&QSpinBox::valueChanged),
|
||||
this,
|
||||
[this](int newValue) {
|
||||
settings_->setPrivacyScreenTimeout(newValue);
|
||||
});
|
||||
[this](int newValue) { settings_->setPrivacyScreenTimeout(newValue); });
|
||||
|
||||
connect(
|
||||
sessionKeysImportBtn, &QPushButton::clicked, this, &UserSettingsPage::importSessionKeys);
|
||||
|
|
|
@ -67,9 +67,10 @@ class UserSettings : public QObject
|
|||
bool avatarCircles READ avatarCircles WRITE setAvatarCircles NOTIFY avatarCirclesChanged)
|
||||
Q_PROPERTY(bool decryptSidebar READ decryptSidebar WRITE setDecryptSidebar NOTIFY
|
||||
decryptSidebarChanged)
|
||||
Q_PROPERTY(bool privacyScreen READ privacyScreen WRITE setPrivacyScreen NOTIFY
|
||||
privacyScreenChanged)
|
||||
Q_PROPERTY(int privacyScreenTimeout READ privacyScreenTimeout WRITE setPrivacyScreenTimeout NOTIFY privacyScreenTimeoutChanged)
|
||||
Q_PROPERTY(
|
||||
bool privacyScreen READ privacyScreen WRITE setPrivacyScreen NOTIFY privacyScreenChanged)
|
||||
Q_PROPERTY(int privacyScreenTimeout READ privacyScreenTimeout WRITE setPrivacyScreenTimeout
|
||||
NOTIFY privacyScreenTimeoutChanged)
|
||||
Q_PROPERTY(int timelineMaxWidth READ timelineMaxWidth WRITE setTimelineMaxWidth NOTIFY
|
||||
timelineMaxWidthChanged)
|
||||
Q_PROPERTY(bool mobileMode READ mobileMode WRITE setMobileMode NOTIFY mobileModeChanged)
|
||||
|
|
Loading…
Reference in a new issue