This commit is contained in:
2025-10-23 00:47:29 +02:00
parent bdccb9e0aa
commit 03adbbd38f
4 changed files with 58 additions and 26 deletions
+29
View File
@@ -0,0 +1,29 @@
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))
}
}
}
+5 -4
View File
@@ -3,15 +3,16 @@ import Quickshell.Io
import Quickshell.Wayland
Rectangle {
width: 320
height: 293
// anchors.bottom: parent.bottom
AnimatedImage {
source: "../Gifs/evernight.gif"
fillMode: Image.PreserveAspectFit
}
// margins {
// mainWindow.left: 50
// }
IpcHandler {
target: "command"