Fix formatting

This commit is contained in:
Joseph Donofry 2021-01-26 00:03:09 -05:00
parent 0794f0a3fd
commit cb93ac3402
No known key found for this signature in database
GPG key ID: E8A1D78EF044B0CB
5 changed files with 44 additions and 27 deletions

View file

@ -14,4 +14,14 @@ do
clang-format -i "$f" clang-format -i "$f"
done; 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 git diff --exit-code

View file

@ -1,22 +1,24 @@
import QtQuick 2.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import QtQuick 2.12
Item { Item {
property var timelineRoot property var timelineRoot
property var imageSource property var imageSource
property int screenTimeout property int screenTimeout
anchors.fill: parent anchors.fill: parent
Timer { Timer {
id: screenSaverTimer id: screenSaverTimer
interval: screenTimeout * 1000 interval: screenTimeout * 1000
running: true running: true
onTriggered: { onTriggered: {
timelineRoot.grabToImage(function(result) { timelineRoot.grabToImage(function(result) {
imageSource = result.url; imageSource = result.url;
screenSaver.visible = true screenSaver.visible = true;
particles.resume() particles.resume();
}, Qt.size(width, height)) }, Qt.size(width, height));
} }
} }
@ -34,12 +36,14 @@ Item {
Rectangle { Rectangle {
id: screenSaver id: screenSaver
anchors.fill: parent anchors.fill: parent
visible: false visible: false
color: "transparent" color: "transparent"
Image { Image {
id: image id: image
visible: screenSaver.visible visible: screenSaver.visible
anchors.fill: parent anchors.fill: parent
source: imageSource source: imageSource
@ -55,6 +59,7 @@ Item {
FastBlur { FastBlur {
id: blur id: blur
anchors.fill: effectSource anchors.fill: effectSource
source: effectSource source: effectSource
radius: 50 radius: 50
@ -67,8 +72,10 @@ Item {
onClicked: { onClicked: {
screenSaver.visible = false; screenSaver.visible = false;
screenSaverTimer.restart(); screenSaverTimer.restart();
mouse.accepted = false mouse.accepted = false;
} }
} }
} }
} }

View file

@ -189,6 +189,7 @@ Page {
ColumnLayout { ColumnLayout {
id: timelineLayout id: timelineLayout
visible: TimelineManager.timeline != null visible: TimelineManager.timeline != null
anchors.fill: parent anchors.fill: parent
spacing: 0 spacing: 0

View file

@ -1168,9 +1168,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
connect(privacyScreenTimeout_, connect(privacyScreenTimeout_,
qOverload<int>(&QSpinBox::valueChanged), qOverload<int>(&QSpinBox::valueChanged),
this, this,
[this](int newValue) { [this](int newValue) { settings_->setPrivacyScreenTimeout(newValue); });
settings_->setPrivacyScreenTimeout(newValue);
});
connect( connect(
sessionKeysImportBtn, &QPushButton::clicked, this, &UserSettingsPage::importSessionKeys); sessionKeysImportBtn, &QPushButton::clicked, this, &UserSettingsPage::importSessionKeys);

View file

@ -67,9 +67,10 @@ class UserSettings : public QObject
bool avatarCircles READ avatarCircles WRITE setAvatarCircles NOTIFY avatarCirclesChanged) bool avatarCircles READ avatarCircles WRITE setAvatarCircles NOTIFY avatarCirclesChanged)
Q_PROPERTY(bool decryptSidebar READ decryptSidebar WRITE setDecryptSidebar NOTIFY Q_PROPERTY(bool decryptSidebar READ decryptSidebar WRITE setDecryptSidebar NOTIFY
decryptSidebarChanged) decryptSidebarChanged)
Q_PROPERTY(bool privacyScreen READ privacyScreen WRITE setPrivacyScreen NOTIFY Q_PROPERTY(
privacyScreenChanged) bool privacyScreen READ privacyScreen WRITE setPrivacyScreen NOTIFY privacyScreenChanged)
Q_PROPERTY(int privacyScreenTimeout READ privacyScreenTimeout WRITE setPrivacyScreenTimeout NOTIFY privacyScreenTimeoutChanged) Q_PROPERTY(int privacyScreenTimeout READ privacyScreenTimeout WRITE setPrivacyScreenTimeout
NOTIFY privacyScreenTimeoutChanged)
Q_PROPERTY(int timelineMaxWidth READ timelineMaxWidth WRITE setTimelineMaxWidth NOTIFY Q_PROPERTY(int timelineMaxWidth READ timelineMaxWidth WRITE setTimelineMaxWidth NOTIFY
timelineMaxWidthChanged) timelineMaxWidthChanged)
Q_PROPERTY(bool mobileMode READ mobileMode WRITE setMobileMode NOTIFY mobileModeChanged) Q_PROPERTY(bool mobileMode READ mobileMode WRITE setMobileMode NOTIFY mobileModeChanged)