mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: replcae the "map it" button
Replace the "map it" button implementation with our own button. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
9d2c4dcd3c
commit
0e0b5cee22
1 changed files with 7 additions and 28 deletions
|
@ -55,37 +55,16 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
SsrfButton {
|
||||||
id: gpsButton
|
id: gpsButton
|
||||||
height: Math.round(1.5 * Kirigami.Units.gridUnit)
|
anchors.right: parent.right
|
||||||
width: dive.gps == "" ? 0 : buttonText.width + Kirigami.Units.gridUnit
|
enabled: dive.gps !== ""
|
||||||
color: subsurfaceTheme.darkerPrimaryColor
|
|
||||||
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")
|
text: qsTr("Map it")
|
||||||
visible: dive.gps !== ""
|
|
||||||
color: subsurfaceTheme.darkerPrimaryTextColor
|
|
||||||
anchors {
|
|
||||||
horizontalCenter: parent.horizontalCenter
|
|
||||||
verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
enabled: dive.gps_decimal !== ""
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (dive.gps_decimal !== "")
|
if (dive.gps_decimal !== "")
|
||||||
showMap(dive.gps_decimal)
|
showMap(dive.gps_decimal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Row {
|
Row {
|
||||||
anchors {
|
anchors {
|
||||||
left: locationText.left
|
left: locationText.left
|
||||||
|
|
Loading…
Add table
Reference in a new issue