summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2017-07-25 17:19:53 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-26 01:39:26 +0900
commit9d2c4dcd3ce530cfe163c4fe1f9fd9a5a934c8bb (patch)
tree3de9193fd409a5cdf2a3017b73b5034469b7456b /mobile-widgets
parent4bcbe8e3a0f517a528e9fcb6cb449f9a41237240 (diff)
downloadsubsurface-9d2c4dcd3ce530cfe163c4fe1f9fd9a5a934c8bb.tar.gz
QML UI: replace button on DC download page
Replace the generic buttons on the DC download page with our own. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml55
1 files changed, 5 insertions, 50 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index 72c5685ce..a1567494f 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -174,18 +174,9 @@ Kirigami.Page {
anchors.right: parent.right
anchors.margins: Kirigami.Units.smallSpacing
spacing: Kirigami.Units.smallSpacing
- Button {
+ SsrfButton {
id: download
- background: Rectangle {
- color: subsurfaceTheme.darkerPrimaryColor
- antialiasing: true
- radius: Kirigami.Units.smallSpacing * 2
- }
text: qsTr("Download")
- contentItem: Text {
- text: download.text
- color: subsurfaceTheme.darkerPrimaryTextColor
- }
onClicked: {
text = qsTr("Retry")
// strip any BT Name from the address
@@ -196,18 +187,9 @@ Kirigami.Page {
downloadThread.start()
}
}
- Button {
+ SsrfButton {
id:quitbutton
- background: Rectangle {
- color: subsurfaceTheme.darkerPrimaryColor
- antialiasing: true
- radius: Kirigami.Units.smallSpacing * 2
- }
text: progressBar.visible ? qsTr("Cancel") : qsTr("Quit")
- contentItem: Text {
- text: quitbutton.text
- color: subsurfaceTheme.darkerPrimaryTextColor
- }
onClicked: {
manager.cancelDownloadDC()
if (!progressBar.visible)
@@ -248,19 +230,10 @@ Kirigami.Page {
text: "" // Spacer on the left for hamburger menu
Layout.fillWidth: true
}
- Button {
+ SsrfButton {
id: acceptButton
enabled: divesDownloaded
- background: Rectangle {
- color: enabled ? subsurfaceTheme.darkerPrimaryColor : "gray"
- antialiasing: true
- radius: Kirigami.Units.smallSpacing * 2
- }
text: qsTr("Accept")
- contentItem: Text {
- text: acceptButton.text
- color: subsurfaceTheme.darkerPrimaryTextColor
- }
onClicked: {
manager.appendTextToLog("Save downloaded dives that were selected")
importModel.recordDives()
@@ -274,36 +247,18 @@ Kirigami.Page {
text: "" // Spacer between 2 button groups
Layout.fillWidth: true
}
- Button {
+ SsrfButton {
id: select
enabled: divesDownloaded
- background: Rectangle {
- color: enabled ? subsurfaceTheme.darkerPrimaryColor : "gray"
- antialiasing: true
- radius: Kirigami.Units.smallSpacing * 2
- }
text: qsTr("Select All")
- contentItem: Text {
- text: select.text
- color: subsurfaceTheme.darkerPrimaryTextColor
- }
onClicked : {
importModel.selectAll()
}
}
- Button {
+ SsrfButton {
id: unselect
enabled: divesDownloaded
- background: Rectangle {
- color: enabled ? subsurfaceTheme.darkerPrimaryColor : "gray"
- antialiasing: true
- radius: Kirigami.Units.smallSpacing * 2
- }
text: qsTr("Unselect All")
- contentItem: Text {
- text: unselect.text
- color: subsurfaceTheme.darkerPrimaryTextColor
- }
onClicked : {
importModel.selectNone()
}