screenYposGae
This commit is contained in:
+6
-11
@@ -25,6 +25,8 @@ Repeater {
|
|||||||
|
|
||||||
// Component.onCompleted: x = xPos()
|
// Component.onCompleted: x = xPos()
|
||||||
|
|
||||||
|
onXChanged: gifSaved.positionX = gifItem.x
|
||||||
|
onYChanged: gifSaved.positionY = gifItem.y
|
||||||
width: Math.floor( gif.sourceSize.width / gifSaved.scaling )
|
width: Math.floor( gif.sourceSize.width / gifSaved.scaling )
|
||||||
height: Math.floor( gif.sourceSize.height / gifSaved.scaling )
|
height: Math.floor( gif.sourceSize.height / gifSaved.scaling )
|
||||||
|
|
||||||
@@ -41,12 +43,6 @@ Repeater {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: gifSaved.scaling = 1
|
onClicked: gifSaved.scaling = 1
|
||||||
|
|
||||||
onReleased: {
|
|
||||||
console.log(gifItem.x)
|
|
||||||
gifSaved.positionX = gifItem.x
|
|
||||||
gifSaved.positionY = gifItem.y
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
@@ -57,8 +53,7 @@ Repeater {
|
|||||||
property string name: gifNames[gifNames.length - 1].split(".")[0] + ".json"
|
property string name: gifNames[gifNames.length - 1].split(".")[0] + ".json"
|
||||||
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet/"
|
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet/"
|
||||||
property string configPath: configDir + name
|
property string configPath: configDir + name
|
||||||
property alias positionX: gifSaved.positionX
|
// property int yGif: ( screen.height - gifItem.height )
|
||||||
property alias positionY: gifSaved.positionY
|
|
||||||
|
|
||||||
onLoaded: {
|
onLoaded: {
|
||||||
gifItem.x = gifSaved.positionX
|
gifItem.x = gifSaved.positionX
|
||||||
@@ -74,9 +69,9 @@ Repeater {
|
|||||||
JsonAdapter {
|
JsonAdapter {
|
||||||
id: gifSaved
|
id: gifSaved
|
||||||
|
|
||||||
property var scaling: 1
|
property real scaling: 1
|
||||||
property var positionX: 0
|
property int positionX: 0
|
||||||
property var positionY: ( Screen.height - gifItem.height )
|
property int positionY: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user