before it goes to ....
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
pragma Singleton
|
||||
|
||||
import QtCore
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
import Quickshell
|
||||
@@ -9,9 +8,6 @@ Singleton {
|
||||
id: root
|
||||
|
||||
property alias gifFolder: adapter.gifFolder
|
||||
property alias scaling: adapter.scaling
|
||||
property alias maxWidth: adapter.maxWidth
|
||||
property alias maxHeight: adapter.maxHeight
|
||||
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet"
|
||||
property string configPath: configDir + "/config.json"
|
||||
|
||||
@@ -24,8 +20,13 @@ Singleton {
|
||||
|
||||
onExited: function( exitCode ) {
|
||||
if ( exitCode !== 0 ) {
|
||||
console.log( "creating dir" )
|
||||
dirCreate.running = true
|
||||
}
|
||||
if ( exitCode !== 1 ) {
|
||||
console.log( "creating config" )
|
||||
configCheck.running = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,13 +48,12 @@ Singleton {
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
onAdapterUpdated: writeAdapter()
|
||||
|
||||
JsonAdapter {
|
||||
id: adapter
|
||||
|
||||
property string gifFolder: Quickshell.shellDir + "/Gifs"
|
||||
property var scaling: 1
|
||||
property int maxWidth: 1000
|
||||
property int maxHeight: 1000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,16 +17,4 @@ Process {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reload() {
|
||||
gifsList = []
|
||||
running = false
|
||||
running = true
|
||||
}
|
||||
|
||||
onGifFolderChanged: {
|
||||
if (running) {
|
||||
getGifsProcess.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-10
@@ -15,15 +15,7 @@ Repeater {
|
||||
|
||||
required property int index
|
||||
required property string modelData
|
||||
|
||||
// function xPos(): int {
|
||||
// let xPos = 0;
|
||||
// const item = gifRepeater.itemAt(index - 1);
|
||||
// if ( item ) xPos += item.x + item.width;
|
||||
// return xPos;
|
||||
// }
|
||||
|
||||
// Component.onCompleted: x = xPos()
|
||||
property int high: ( screen.height - gifItem.height )
|
||||
|
||||
onXChanged: gifSaved.positionX = gifItem.x
|
||||
onYChanged: gifSaved.positionY = gifItem.y
|
||||
@@ -53,7 +45,6 @@ Repeater {
|
||||
property string name: gifNames[gifNames.length - 1].split(".")[0] + ".json"
|
||||
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet/"
|
||||
property string configPath: configDir + name
|
||||
// property int yGif: ( screen.height - gifItem.height )
|
||||
|
||||
onLoaded: {
|
||||
gifItem.x = gifSaved.positionX
|
||||
|
||||
Reference in New Issue
Block a user