aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jocke <j.bygdell@gmail.com>2018-09-23 15:58:47 +0200
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2018-09-25 15:35:43 +0200
commitc68ac31425d18d01468aac31fecf098bedc40e51 (patch)
treed73fe6a65838ede63b6f7c86fbc8cabdebbb52d9
parent2d3777ce8764af1a99745db2b9d1b2a814336402 (diff)
downloadsubsurface-c68ac31425d18d01468aac31fecf098bedc40e51.tar.gz
Mobile/download DC: disable selected DC button
Disable the button for the currently selected DC. This gives an extra visual hint of which DC is currently selected. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index 752697b34..9321d631e 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -191,6 +191,10 @@ Kirigami.Page {
text: PrefDiveComputer.vendor1 + " - " + PrefDiveComputer.product1
onClicked: {
// update comboboxes
+ dc1.enabled = false
+ dc2.enabled = true
+ dc3.enabled = true
+ dc4.enabled = true
rememberedDCsGrid.setDC(PrefDiveComputer.vendor1, PrefDiveComputer.product1, PrefDiveComputer.device1)
}
}
@@ -200,6 +204,10 @@ Kirigami.Page {
text: PrefDiveComputer.vendor2 + " - " + PrefDiveComputer.product2
onClicked: {
// update comboboxes
+ dc1.enabled = true
+ dc2.enabled = false
+ dc3.enabled = true
+ dc4.enabled = true
rememberedDCsGrid.setDC(PrefDiveComputer.vendor2, PrefDiveComputer.product2, PrefDiveComputer.device2)
}
}
@@ -209,6 +217,10 @@ Kirigami.Page {
text: PrefDiveComputer.vendor3 + " - " + PrefDiveComputer.product3
onClicked: {
// update comboboxes
+ dc1.enabled = true
+ dc2.enabled = true
+ dc3.enabled = false
+ dc4.enabled = true
rememberedDCsGrid.setDC(PrefDiveComputer.vendor3, PrefDiveComputer.product3, PrefDiveComputer.device3)
}
}
@@ -218,6 +230,10 @@ Kirigami.Page {
text: PrefDiveComputer.vendor4 + " - " + PrefDiveComputer.product4
onClicked: {
// update comboboxes
+ dc1.enabled = true
+ dc2.enabled = true
+ dc3.enabled = true
+ dc4.enabled = false
rememberedDCsGrid.setDC(PrefDiveComputer.vendor4, PrefDiveComputer.product4, PrefDiveComputer.device4)
}
}
@@ -350,6 +366,7 @@ Kirigami.Page {
comboVendor.currentIndex = comboProduct.currentIndex = comboConnection.currentIndex = -1
if (visible && PrefDiveComputer.vendor !== "" ) {
rememberedDCsGrid.setDC(PrefDiveComputer.vendor1, PrefDiveComputer.product1, PrefDiveComputer.device1)
+ dc1.enabled = false
}
}
}