summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveDetailsView.qml32
1 files changed, 31 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml
index b2ad2d4cd..5053f866f 100644
--- a/mobile-widgets/qml/DiveDetailsView.qml
+++ b/mobile-widgets/qml/DiveDetailsView.qml
@@ -43,7 +43,7 @@ Item {
anchors {
left: parent.left
top: parent.top
- right: parent.right
+ right: gpsButton.left
margins: Math.round(Kirigami.Units.gridUnit / 2)
}
MouseArea {
@@ -55,6 +55,36 @@ Item {
}
}
}
+ Rectangle {
+ id: gpsButton
+ height: Math.round(1.5 * Kirigami.Units.gridUnit)
+ width: dive.gps == "" ? 0 : buttonText.width + Kirigami.Units.gridUnit
+ color: subsurfaceTheme.accentColor
+ antialiasing: true
+ radius: Kirigami.Units.smallSpacing * 2
+ anchors {
+ right: parent.right
+ top: parent.top
+ topMargin: Math.round(Kirigami.Units.gridUnit / 2)
+ }
+ Kirigami.Label {
+ id: buttonText
+ text: qsTr("Map it")
+ color: subsurfaceTheme.darkBackgroundColor
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ verticalCenter: parent.verticalCenter
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ visible: dive.gps_decimal !== ""
+ onClicked: {
+ if (dive.gps_decimal !== "")
+ showMap(dive.gps_decimal)
+ }
+ }
+ }
Row {
anchors {
left: locationText.left