repeater
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Process {
|
||||
id: getGifsProcess
|
||||
property list<string> gifsList: []
|
||||
command: ["sh", "-c", "./Scripts/files.sh"]
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
var gifs = this.text.trim().split("\n")
|
||||
getGifsProcess.gifsList = gifs
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import qs.Modules
|
||||
|
||||
Repeater {
|
||||
id: gifRepeater
|
||||
required property list<string> gifsList
|
||||
model: gifsList
|
||||
Item {
|
||||
width: gif.width
|
||||
height: gif.height
|
||||
AnimatedImage {
|
||||
id: gif
|
||||
source: modelData
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
Mouse {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import QtQuick
|
||||
|
||||
Rectangle {
|
||||
width: 227
|
||||
height: 212
|
||||
width: AnimatedImage.width
|
||||
height: AnimatedImage.height
|
||||
|
||||
AnimatedImage {
|
||||
source: "../Gifs/Acheron.gif"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user