REGIONS
This commit is contained in:
+6
-23
@@ -3,27 +3,10 @@ import QtQuick
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton
|
||||
property bool dragging: false
|
||||
property real offsetX: 0
|
||||
property real offsetY: 0
|
||||
|
||||
onPressed: {
|
||||
if (mouse.x >= original.x &&
|
||||
mouse.x <= original.x + original.width &&
|
||||
mouse.y >= original.y &&
|
||||
mouse.y <= original.y + original.height) {
|
||||
dragging = true
|
||||
offsetX = mouse.x - original.x
|
||||
offsetY = mouse.y - original.y
|
||||
}
|
||||
}
|
||||
|
||||
onReleased: dragging = false
|
||||
|
||||
onPositionChanged: {
|
||||
if (dragging) {
|
||||
original.x = Math.max(0, Math.min(mouse.x - offsetX, Screen.width - original.width))
|
||||
original.y = Math.max(0, Math.min(mouse.y - offsetY, Screen.height - original.height))
|
||||
}
|
||||
}
|
||||
drag.target: dragEvernight
|
||||
drag.axis: Drag.XAndYAxis
|
||||
drag.minimumX: 0
|
||||
drag.maximumX: Screen.width - evernight.width
|
||||
drag.minimumY: 0
|
||||
drag.maximumY: Screen.height - evernight.height
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
|
||||
Rectangle {
|
||||
width: 227
|
||||
height: 212
|
||||
|
||||
AnimatedImage {
|
||||
source: "../Gifs/Acheron.gif"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,8 @@ Rectangle {
|
||||
width: 320
|
||||
height: 293
|
||||
|
||||
// anchors.bottom: parent.bottom
|
||||
|
||||
AnimatedImage {
|
||||
source: "../Gifs/evernight.gif"
|
||||
source: "../Gifs/Evernight.gif"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user