mobile/dive-details: remove the redundant 'map it' button

You can already get to the map by either clicking on the location text
or on the left action button. This third way to get there reduces the
available space for the location text, and can cause positioning issues
with very long location texts creating three or more lines of text,
which then overwrites the dateRow below.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-03-30 09:34:12 -07:00
parent c406ad83ea
commit aeb1794616

View file

@ -41,7 +41,7 @@ Item {
anchors { anchors {
left: parent.left left: parent.left
top: parent.top top: parent.top
right: gpsButton.left right: parent.right
margins: Math.round(Kirigami.Units.gridUnit / 2) margins: Math.round(Kirigami.Units.gridUnit / 2)
} }
MouseArea { MouseArea {
@ -53,22 +53,11 @@ Item {
} }
} }
} }
TemplateButton {
id: gpsButton
anchors.right: parent.right
anchors.verticalCenter: locationText.verticalCenter
enabled: gps !== ""
text: qsTr("Map it")
onClicked: {
showMap()
mapPage.centerOnDiveSite(diveSite)
}
}
Row { Row {
id: dateRow id: dateRow
anchors { anchors {
left: locationText.left left: locationText.left
top: gpsButton.bottom top: locationText.bottom
topMargin: Kirigami.Units.smallSpacing topMargin: Kirigami.Units.smallSpacing
bottom: numberText.bottom bottom: numberText.bottom
@ -100,7 +89,7 @@ Item {
color: subsurfaceTheme.textColor color: subsurfaceTheme.textColor
anchors { anchors {
right: parent.right right: parent.right
top: gpsButton.bottom top: locationText.bottom
topMargin: Kirigami.Units.smallSpacing topMargin: Kirigami.Units.smallSpacing
} }
} }