summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-20 19:25:59 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commit7dfb168f7fd2b9d32c4296e2aab15ef87a79f31a (patch)
treefb96ece80d7d3e5407a6f2e119afa5bff13cf81d /mobile-widgets
parentde73cf1c90e2459f5c8b7f4196282887fe0ff623 (diff)
downloadsubsurface-7dfb168f7fd2b9d32c4296e2aab15ef87a79f31a.tar.gz
mapwidgetcontextmenu: position the contextMenu on the map
The anchor of the menu itself will be positioned near the edge of the map widget, while the menu contents will have negative coordinates. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/MapWidget.qml1
-rw-r--r--mobile-widgets/qml/MapWidgetContextMenu.qml1
2 files changed, 2 insertions, 0 deletions
diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml
index 5310bb4d6..684d76a03 100644
--- a/mobile-widgets/qml/MapWidget.qml
+++ b/mobile-widgets/qml/MapWidget.qml
@@ -140,5 +140,6 @@ Item {
MapWidgetContextMenu {
id: contextMenu
+ y: 10; x: map.width - y
}
}
diff --git a/mobile-widgets/qml/MapWidgetContextMenu.qml b/mobile-widgets/qml/MapWidgetContextMenu.qml
index 47616de30..f2ab27f79 100644
--- a/mobile-widgets/qml/MapWidgetContextMenu.qml
+++ b/mobile-widgets/qml/MapWidgetContextMenu.qml
@@ -4,6 +4,7 @@ import QtQuick 2.7
Item {
Image {
id: contextMenuImage
+ x: -width
source: "qrc:///mapwidget-context-menu"
SequentialAnimation {