[welcomeq] Add configuration file

- copy the buttons-config part from welcome.conf
 - create buttons in the QML part
This commit is contained in:
Adriaan de Groot 2020-02-12 18:24:07 +01:00
parent 85b873a1a2
commit 7e0cc7af41
2 changed files with 96 additions and 0 deletions

View File

@ -0,0 +1,25 @@
# Configuration for the welcome module. The welcome page
# displays some information from the branding file.
# Which parts it displays can be configured through
# the show* variables.
#
# In addition to displaying the welcome page, this module
# can check requirements for installation.
---
# Display settings for various buttons on the welcome page.
# The URLs themselves come from branding.desc is the setting
# here is "true". If the setting is false, the button is hidden.
# The setting can also be a full URL which will then be used
# instead of the one from the branding file, or empty or not-set
# which will hide the button.
showSupportUrl: true
showKnownIssuesUrl: true
showReleaseNotesUrl: true
# If this Url is set to something non-empty, a "donate"
# button is added to the welcome page alongside the
# others (see settings, above). Clicking the button opens
# the corresponding link. (This button has no corresponding
# branding.desc string)
#
# showDonateUrl: https://kde.org/community/donations/

View File

@ -54,5 +54,76 @@ Page
sourceSize.width: width
sourceSize.height: height
}
RowLayout
{
id: buttonBar
width: parent.width
height: 64
anchors.bottom: parent.bottom
spacing: Kirigami.Units.largeSpacing* 2
/* Traditionally Calamares has had an "About" button that talks about
* Calamares itself, which just isn't a very useful thing in someone
* else's installation ISO.
*/
Button
{
Layout.fillWidth: true
text: qsTr("About")
icon.name: "documentinfo"
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
Kirigami.Theme.textColor: "#fff"
visible: false
onClicked: { } // TODO: show an about-Calamares window
}
Button
{
Layout.fillWidth: true
text: qsTr("Support")
icon.name: "documentinfo"
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
Kirigami.Theme.textColor: "#fff"
visible: config.helpUrl.isValid
onClicked: Qt.openUrlExternally(config.helpUrl)
}
Button
{
Layout.fillWidth: true
text: qsTr("Known issues")
icon.name: "documentinfo"
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
Kirigami.Theme.textColor: "#fff"
visible: config.issuesUrl.isValid
onClicked: Qt.openUrlExternally(config.issuesUrl)
}
Button
{
Layout.fillWidth: true
text: qsTr("Release notes")
icon.name: "documentinfo"
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
Kirigami.Theme.textColor: "#fff"
visible: config.notesUrl.isValid
onClicked: Qt.openUrlExternally(config.notesUrl)
}
Button
{
Layout.fillWidth: true
text: qsTr("Donate")
icon.name: "documentinfo"
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
Kirigami.Theme.textColor: "#fff"
visible: config.donateUrl.isValid
onClicked: Qt.openUrlExternally(config.donateUrl)
}
}
}
}