diff options
author | Lubos Dolezel <lubos@dolezel.info> | 2015-06-11 15:16:39 +0200 |
---|---|---|
committer | Lubos Dolezel <lubos@dolezel.info> | 2015-06-11 15:16:39 +0200 |
commit | baedd87c10dabb9178ec870ea43185f4c34795ea (patch) | |
tree | fd0e5d9b795796f4c6dcdd72b17960f7f13a45af /src/gui/qml/incoming_call.qml | |
parent | c0fb261ea49f638b49ed68c5eb5385c11ab8d407 (diff) | |
download | twinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.tar twinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.tar.gz twinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.tar.lz twinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.tar.xz twinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.zip |
Remember OSD/popup location (resolves #16)
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() + } + } + } } |