mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
4bcbe8e3a0
commit
9d2c4dcd3c
1 changed files with 5 additions and 50 deletions
|
@ -174,18 +174,9 @@ Kirigami.Page {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: Kirigami.Units.smallSpacing
|
anchors.margins: Kirigami.Units.smallSpacing
|
||||||
spacing: Kirigami.Units.smallSpacing
|
spacing: Kirigami.Units.smallSpacing
|
||||||
Button {
|
SsrfButton {
|
||||||
id: download
|
id: download
|
||||||
background: Rectangle {
|
|
||||||
color: subsurfaceTheme.darkerPrimaryColor
|
|
||||||
antialiasing: true
|
|
||||||
radius: Kirigami.Units.smallSpacing * 2
|
|
||||||
}
|
|
||||||
text: qsTr("Download")
|
text: qsTr("Download")
|
||||||
contentItem: Text {
|
|
||||||
text: download.text
|
|
||||||
color: subsurfaceTheme.darkerPrimaryTextColor
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
text = qsTr("Retry")
|
text = qsTr("Retry")
|
||||||
// strip any BT Name from the address
|
// strip any BT Name from the address
|
||||||
|
@ -196,18 +187,9 @@ Kirigami.Page {
|
||||||
downloadThread.start()
|
downloadThread.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
SsrfButton {
|
||||||
id:quitbutton
|
id:quitbutton
|
||||||
background: Rectangle {
|
|
||||||
color: subsurfaceTheme.darkerPrimaryColor
|
|
||||||
antialiasing: true
|
|
||||||
radius: Kirigami.Units.smallSpacing * 2
|
|
||||||
}
|
|
||||||
text: progressBar.visible ? qsTr("Cancel") : qsTr("Quit")
|
text: progressBar.visible ? qsTr("Cancel") : qsTr("Quit")
|
||||||
contentItem: Text {
|
|
||||||
text: quitbutton.text
|
|
||||||
color: subsurfaceTheme.darkerPrimaryTextColor
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
manager.cancelDownloadDC()
|
manager.cancelDownloadDC()
|
||||||
if (!progressBar.visible)
|
if (!progressBar.visible)
|
||||||
|
@ -248,19 +230,10 @@ Kirigami.Page {
|
||||||
text: "" // Spacer on the left for hamburger menu
|
text: "" // Spacer on the left for hamburger menu
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
SsrfButton {
|
||||||
id: acceptButton
|
id: acceptButton
|
||||||
enabled: divesDownloaded
|
enabled: divesDownloaded
|
||||||
background: Rectangle {
|
|
||||||
color: enabled ? subsurfaceTheme.darkerPrimaryColor : "gray"
|
|
||||||
antialiasing: true
|
|
||||||
radius: Kirigami.Units.smallSpacing * 2
|
|
||||||
}
|
|
||||||
text: qsTr("Accept")
|
text: qsTr("Accept")
|
||||||
contentItem: Text {
|
|
||||||
text: acceptButton.text
|
|
||||||
color: subsurfaceTheme.darkerPrimaryTextColor
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
manager.appendTextToLog("Save downloaded dives that were selected")
|
manager.appendTextToLog("Save downloaded dives that were selected")
|
||||||
importModel.recordDives()
|
importModel.recordDives()
|
||||||
|
@ -274,36 +247,18 @@ Kirigami.Page {
|
||||||
text: "" // Spacer between 2 button groups
|
text: "" // Spacer between 2 button groups
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
SsrfButton {
|
||||||
id: select
|
id: select
|
||||||
enabled: divesDownloaded
|
enabled: divesDownloaded
|
||||||
background: Rectangle {
|
|
||||||
color: enabled ? subsurfaceTheme.darkerPrimaryColor : "gray"
|
|
||||||
antialiasing: true
|
|
||||||
radius: Kirigami.Units.smallSpacing * 2
|
|
||||||
}
|
|
||||||
text: qsTr("Select All")
|
text: qsTr("Select All")
|
||||||
contentItem: Text {
|
|
||||||
text: select.text
|
|
||||||
color: subsurfaceTheme.darkerPrimaryTextColor
|
|
||||||
}
|
|
||||||
onClicked : {
|
onClicked : {
|
||||||
importModel.selectAll()
|
importModel.selectAll()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
SsrfButton {
|
||||||
id: unselect
|
id: unselect
|
||||||
enabled: divesDownloaded
|
enabled: divesDownloaded
|
||||||
background: Rectangle {
|
|
||||||
color: enabled ? subsurfaceTheme.darkerPrimaryColor : "gray"
|
|
||||||
antialiasing: true
|
|
||||||
radius: Kirigami.Units.smallSpacing * 2
|
|
||||||
}
|
|
||||||
text: qsTr("Unselect All")
|
text: qsTr("Unselect All")
|
||||||
contentItem: Text {
|
|
||||||
text: unselect.text
|
|
||||||
color: subsurfaceTheme.darkerPrimaryTextColor
|
|
||||||
}
|
|
||||||
onClicked : {
|
onClicked : {
|
||||||
importModel.selectNone()
|
importModel.selectNone()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue