diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2017-07-25 17:22:13 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-26 01:39:26 +0900 |
commit | 0e0b5cee22ce4b9d5ef38a49e57349f901b28735 (patch) | |
tree | 213aeea5d1aa35a0ff3c2cb9f7e985ed931abb48 | |
parent | 9d2c4dcd3ce530cfe163c4fe1f9fd9a5a934c8bb (diff) | |
download | subsurface-0e0b5cee22ce4b9d5ef38a49e57349f901b28735.tar.gz |
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>
-rw-r--r-- | mobile-widgets/qml/DiveDetailsView.qml | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml index 0e5c90de6..b5808259a 100644 --- a/mobile-widgets/qml/DiveDetailsView.qml +++ b/mobile-widgets/qml/DiveDetailsView.qml @@ -55,35 +55,14 @@ Item { } } } - Rectangle { + SsrfButton { id: gpsButton - height: Math.round(1.5 * Kirigami.Units.gridUnit) - width: dive.gps == "" ? 0 : buttonText.width + Kirigami.Units.gridUnit - 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") - visible: dive.gps !== "" - color: subsurfaceTheme.darkerPrimaryTextColor - anchors { - horizontalCenter: parent.horizontalCenter - verticalCenter: parent.verticalCenter - } - } - MouseArea { - anchors.fill: parent - enabled: dive.gps_decimal !== "" - onClicked: { - if (dive.gps_decimal !== "") - showMap(dive.gps_decimal) - } + anchors.right: parent.right + enabled: dive.gps !== "" + text: qsTr("Map it") + onClicked: { + if (dive.gps_decimal !== "") + showMap(dive.gps_decimal) } } Row { |