Animate GIF wallpapers in the shell
This commit is contained in:
1 parent
5419a35cd1
commit
59259e88b5
5 files changed
+27
-27
No files matched your search
@@ -41,6 +41,10 @@ Item {
|
||||
return Util.fileUrl(path)
|
||||
}
|
||||
|
||||
function isAnimated(path) {
|
||||
return /\.gif$/i.test(String(path || ""))
|
||||
}
|
||||
|
||||
function refreshBackground() {
|
||||
if (!readlinkProc.running) readlinkProc.running = true
|
||||
if (!monitorBackgroundProc.running) monitorBackgroundProc.running = true
|
||||
@@ -274,6 +278,19 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
AnimatedImage {
|
||||
id: animatedBase
|
||||
readonly property string path: panel.hasAssignment ? panel.assignedBackground : root.displayedBackground
|
||||
readonly property bool wanted: root.isAnimated(path)
|
||||
anchors.fill: parent
|
||||
source: wanted ? root.imageUrl(path) : ""
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
cache: false
|
||||
visible: wanted && status === AnimatedImage.Ready
|
||||
playing: visible
|
||||
}
|
||||
|
||||
Image {
|
||||
id: oldFrame
|
||||
anchors.fill: parent
|
||||
|
||||
Reference in new issue
Block a user