mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
mobile/dc-download: fix dark theme appearance
I noticed that the download from dive computer page looked especially bad in the dark theme (a user sent us some screenshots for a different reason) and a quick look at the sources showed that we weren't using our template label. Switching to that gives us the correct size by default so we can drop all those explicit font size parameters. And we get the correct color as used in the theme. One random whitespace cleanup snuck into this commit. Oh well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
dbd1ee306a
commit
4798382e70
1 changed files with 11 additions and 15 deletions
|
@ -51,9 +51,8 @@ Kirigami.Page {
|
||||||
Layout.topMargin: Kirigami.Units.smallSpacing * 4
|
Layout.topMargin: Kirigami.Units.smallSpacing * 4
|
||||||
columns: 2
|
columns: 2
|
||||||
rowSpacing: 0
|
rowSpacing: 0
|
||||||
Controls.Label {
|
TemplateLabel {
|
||||||
text: qsTr(" Vendor name: ")
|
text: qsTr(" Vendor name: ")
|
||||||
font.pointSize: subsurfaceTheme.regularPointSize
|
|
||||||
}
|
}
|
||||||
Controls.ComboBox {
|
Controls.ComboBox {
|
||||||
id: comboVendor
|
id: comboVendor
|
||||||
|
@ -88,9 +87,8 @@ Kirigami.Page {
|
||||||
comboProduct.currentIndex = manager.getDetectedProductIndex(currentText)
|
comboProduct.currentIndex = manager.getDetectedProductIndex(currentText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.Label {
|
TemplateLabel {
|
||||||
text: qsTr(" Dive Computer:")
|
text: qsTr(" Dive Computer:")
|
||||||
font.pointSize: subsurfaceTheme.regularPointSize
|
|
||||||
}
|
}
|
||||||
Controls.ComboBox {
|
Controls.ComboBox {
|
||||||
id: comboProduct
|
id: comboProduct
|
||||||
|
@ -128,9 +126,8 @@ Kirigami.Page {
|
||||||
currentIndex = manager.getDetectedProductIndex(comboVendor.currentText)
|
currentIndex = manager.getDetectedProductIndex(comboVendor.currentText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.Label {
|
TemplateLabel {
|
||||||
text: qsTr(" Connection:")
|
text: qsTr(" Connection:")
|
||||||
font.pointSize: subsurfaceTheme.regularPointSize
|
|
||||||
}
|
}
|
||||||
Controls.ComboBox {
|
Controls.ComboBox {
|
||||||
id: comboConnection
|
id: comboConnection
|
||||||
|
@ -174,7 +171,7 @@ Kirigami.Page {
|
||||||
dc1.enabled = dc2.enabled = dc3.enabled = dc4.enabled = true
|
dc1.enabled = dc2.enabled = dc3.enabled = dc4.enabled = true
|
||||||
for (var i = 1; i < 5; i++) {
|
for (var i = 1; i < 5; i++) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1:
|
case 1:
|
||||||
curVendor = PrefDiveComputer.vendor1
|
curVendor = PrefDiveComputer.vendor1
|
||||||
curProduct = PrefDiveComputer.product1
|
curProduct = PrefDiveComputer.product1
|
||||||
curDevice = PrefDiveComputer.device1
|
curDevice = PrefDiveComputer.device1
|
||||||
|
@ -217,9 +214,8 @@ Kirigami.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Label {
|
TemplateLabel {
|
||||||
text: qsTr(" Previously used dive computers: ")
|
text: qsTr(" Previously used dive computers: ")
|
||||||
font.pointSize: subsurfaceTheme.regularPointSize
|
|
||||||
visible: PrefDiveComputer.vendor1 !== ""
|
visible: PrefDiveComputer.vendor1 !== ""
|
||||||
}
|
}
|
||||||
Flow {
|
Flow {
|
||||||
|
@ -237,7 +233,7 @@ Kirigami.Page {
|
||||||
}
|
}
|
||||||
function disableDC(inx) {
|
function disableDC(inx) {
|
||||||
switch (inx) {
|
switch (inx) {
|
||||||
case 1:
|
case 1:
|
||||||
dc1.enabled = false
|
dc1.enabled = false
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -387,7 +383,7 @@ Kirigami.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Label {
|
TemplateLabel {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: divesDownloaded ? qsTr(" Downloaded dives") :
|
text: divesDownloaded ? qsTr(" Downloaded dives") :
|
||||||
(manager.progressMessage != "" ? qsTr("Info:") + " " + manager.progressMessage : btMessage)
|
(manager.progressMessage != "" ? qsTr("Info:") + " " + manager.progressMessage : btMessage)
|
||||||
|
@ -411,7 +407,7 @@ Kirigami.Page {
|
||||||
manager.DC_forceDownload = !manager.DC_forceDownload;
|
manager.DC_forceDownload = !manager.DC_forceDownload;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.Label {
|
TemplateLabel {
|
||||||
id: forceAllLabel
|
id: forceAllLabel
|
||||||
text: qsTr("force downloading all dives")
|
text: qsTr("force downloading all dives")
|
||||||
visible: comboVendor.currentIndex != -1 && comboProduct.currentIndex != -1 &&
|
visible: comboVendor.currentIndex != -1 && comboProduct.currentIndex != -1 &&
|
||||||
|
@ -441,7 +437,7 @@ Kirigami.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.Label {
|
TemplateLabel {
|
||||||
text: qsTr("Please wait while we record these dives...")
|
text: qsTr("Please wait while we record these dives...")
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: acceptButton.busy
|
visible: acceptButton.busy
|
||||||
|
@ -449,7 +445,7 @@ Kirigami.Page {
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: bottomButtons
|
id: bottomButtons
|
||||||
Controls.Label {
|
TemplateLabel {
|
||||||
text: "" // Spacer on the left for hamburger menu
|
text: "" // Spacer on the left for hamburger menu
|
||||||
width: Kirigami.Units.gridUnit * 2.5
|
width: Kirigami.Units.gridUnit * 2.5
|
||||||
}
|
}
|
||||||
|
@ -476,7 +472,7 @@ Kirigami.Page {
|
||||||
divesDownloaded = false
|
divesDownloaded = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.Label {
|
TemplateLabel {
|
||||||
text: "" // Spacer between 2 button groups
|
text: "" // Spacer between 2 button groups
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue