mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
QML UI: DiveDetailsView add button for map
Implementing another suggestion from Davide. A button to get the map (as well as just tapping on the location name). Fixes #431 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7ccda01e7e
commit
20dae442ad
1 changed files with 31 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue