2020-11-30 17:03:52 +00:00
|
|
|
import QtQuick 2.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-11-30 17:03:52 +00:00
|
|
|
|
|
|
|
Rectangle {
|
2021-03-05 16:19:40 +00:00
|
|
|
signal released()
|
|
|
|
signal pressed()
|
|
|
|
|
2020-11-30 17:03:52 +00:00
|
|
|
id: root
|
|
|
|
width: 25
|
|
|
|
height: 25
|
|
|
|
border.width: 2
|
|
|
|
border.color: Style.current.orange
|
|
|
|
color: Utils.setColorAlpha(Style.current.orange, 0.5)
|
|
|
|
|
|
|
|
Drag.active: dragArea.drag.active
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: dragArea
|
|
|
|
property int oldX
|
|
|
|
property int oldY
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
drag.target: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
2021-03-05 16:19:40 +00:00
|
|
|
onReleased: root.released()
|
|
|
|
onPressed: root.pressed()
|
2020-11-30 17:03:52 +00:00
|
|
|
}
|
|
|
|
}
|