Make lock wallpaper lazy
This commit is contained in:
@@ -12,6 +12,7 @@ Item {
|
|||||||
property string failureMessage: ""
|
property string failureMessage: ""
|
||||||
property int failedAttempts: 0
|
property int failedAttempts: 0
|
||||||
property bool inputEnabled: true
|
property bool inputEnabled: true
|
||||||
|
property bool loadBackground: true
|
||||||
property string passwordText: ""
|
property string passwordText: ""
|
||||||
property real scaleFactor: 1
|
property real scaleFactor: 1
|
||||||
property bool syncingPasswordText: false
|
property bool syncingPasswordText: false
|
||||||
@@ -71,7 +72,7 @@ Item {
|
|||||||
Image {
|
Image {
|
||||||
id: wallpaper
|
id: wallpaper
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: root.fileUrl(root.backgroundPath)
|
source: root.loadBackground ? root.fileUrl(root.backgroundPath) : ""
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
cache: false
|
cache: false
|
||||||
@@ -83,7 +84,7 @@ Item {
|
|||||||
anchors.fill: wallpaper
|
anchors.fill: wallpaper
|
||||||
source: wallpaper
|
source: wallpaper
|
||||||
autoPaddingEnabled: false
|
autoPaddingEnabled: false
|
||||||
blurEnabled: wallpaper.status === Image.Ready
|
blurEnabled: root.loadBackground && wallpaper.status === Image.Ready
|
||||||
blur: 1.0
|
blur: 1.0
|
||||||
blurMax: 64
|
blurMax: 64
|
||||||
blurMultiplier: 1.0
|
blurMultiplier: 1.0
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ Item {
|
|||||||
failureMessage: root.failureMessage
|
failureMessage: root.failureMessage
|
||||||
failedAttempts: root.failedAttempts
|
failedAttempts: root.failedAttempts
|
||||||
inputEnabled: root.lockRequested
|
inputEnabled: root.lockRequested
|
||||||
|
loadBackground: root.locked
|
||||||
passwordText: root.enteredPassword
|
passwordText: root.enteredPassword
|
||||||
scaleFactor: lockSurface.screen && lockSurface.screen.devicePixelRatio > 0 ? lockSurface.screen.devicePixelRatio : 1
|
scaleFactor: lockSurface.screen && lockSurface.screen.devicePixelRatio > 0 ? lockSurface.screen.devicePixelRatio : 1
|
||||||
onPasswordTextEdited: function(password) { root.enteredPassword = password }
|
onPasswordTextEdited: function(password) { root.enteredPassword = password }
|
||||||
@@ -217,6 +218,7 @@ Item {
|
|||||||
failureMessage: ""
|
failureMessage: ""
|
||||||
failedAttempts: 0
|
failedAttempts: 0
|
||||||
inputEnabled: false
|
inputEnabled: false
|
||||||
|
loadBackground: root.previewVisible
|
||||||
passwordText: ""
|
passwordText: ""
|
||||||
scaleFactor: previewWindow.screen && previewWindow.screen.devicePixelRatio > 0 ? previewWindow.screen.devicePixelRatio : 1
|
scaleFactor: previewWindow.screen && previewWindow.screen.devicePixelRatio > 0 ? previewWindow.screen.devicePixelRatio : 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user