diff options
Diffstat (limited to 'src/gui/qml/incoming_call.qml')
-rw-r--r-- | src/gui/qml/incoming_call.qml | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/gui/qml/incoming_call.qml b/src/gui/qml/incoming_call.qml index bdcb161..1b8428e 100644 --- a/src/gui/qml/incoming_call.qml +++ b/src/gui/qml/incoming_call.qml @@ -1,11 +1,13 @@ import QtQuick 1.1 Rectangle { - id: rectangle1 + id: rectanglePopup width: 400 height: 70 color: "black" + signal moved + Image { id: image1 anchors.bottom: parent.bottom @@ -58,5 +60,24 @@ Rectangle { anchors.leftMargin: 15 image: "qrc:/icons/images/popup_incoming_reject.png" } + + MouseArea { + anchors.fill: parent + property variant previousPosition + onPressed: { + previousPosition = Qt.point(mouseX, mouseY) + } + onPositionChanged: { + if (pressedButtons == Qt.LeftButton) { + var dx = mouseX - previousPosition.x + var dy = mouseY - previousPosition.y + viewerWidget.pos = Qt.point(viewerWidget.pos.x + dx, + viewerWidget.pos.y + dy) + + previousPosition = Qt.point(mouseX, mouseY) + rectanglePopup.moved() + } + } + } } |