aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-10-16 00:12:20 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-15 17:28:39 -0800
commit49c8c966fc60d5c7939873607f05013a92fce8ed (patch)
tree400bc0a1cc768a8453ace97e8d3c8afe708b4cd2
parent07c91805d9fa84587ba787798f93fe37c62de441 (diff)
downloadsubsurface-49c8c966fc60d5c7939873607f05013a92fce8ed.tar.gz
qml-icons: add a third, grayed-out map marker
It can be difficult to distinguish the new marker which is added on the map and has to be dragged when editing a new dive location. By adding a new grayed-out marker it becomes possible to gray out all other markers, while the current marker which is being edited is still bright red. Suggested-by: Dietrich Meyer <dietrich@sunnynames.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
-rw-r--r--mobile-widgets/qml/MapWidget.qml2
-rw-r--r--mobile-widgets/qml/icons/mapwidget-marker-gray.pngbin0 -> 2033 bytes
-rw-r--r--subsurface.qrc1
3 files changed, 2 insertions, 1 deletions
diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml
index 140c279ff..d291dd4d7 100644
--- a/mobile-widgets/qml/MapWidget.qml
+++ b/mobile-widgets/qml/MapWidget.qml
@@ -51,7 +51,7 @@ Item {
z: mapHelper.model.selectedUuid === model.uuid ? mapHelper.model.count - 1 : 0
sourceItem: Image {
id: mapItemImage
- source: "qrc:///mapwidget-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : "")
+ source: "qrc:///mapwidget-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : (mapHelper.editMode ? "-gray" : ""))
SequentialAnimation {
id: mapItemImageAnimation
PropertyAnimation { target: mapItemImage; property: "scale"; from: 1.0; to: 0.7; duration: 120 }
diff --git a/mobile-widgets/qml/icons/mapwidget-marker-gray.png b/mobile-widgets/qml/icons/mapwidget-marker-gray.png
new file mode 100644
index 000000000..856db9f5b
--- /dev/null
+++ b/mobile-widgets/qml/icons/mapwidget-marker-gray.png
Binary files differ
diff --git a/subsurface.qrc b/subsurface.qrc
index fc4e2ce6c..0e910675a 100644
--- a/subsurface.qrc
+++ b/subsurface.qrc
@@ -4,6 +4,7 @@
<file alias="MapWidgetError.qml">mobile-widgets/qml/MapWidgetError.qml</file>
<file alias="MapWidgetContextMenu.qml">mobile-widgets/qml/MapWidgetContextMenu.qml</file>
<file alias="mapwidget-marker">mobile-widgets/qml/icons/mapwidget-marker.png</file>
+ <file alias="mapwidget-marker-gray">mobile-widgets/qml/icons/mapwidget-marker-gray.png</file>
<file alias="mapwidget-marker-selected">mobile-widgets/qml/icons/mapwidget-marker-selected.png</file>
<file alias="mapwidget-toggle-satellite">mobile-widgets/qml/icons/mapwidget-toggle-satellite.png</file>
<file alias="mapwidget-toggle-street">mobile-widgets/qml/icons/mapwidget-toggle-street.png</file>