[welcomeq] Hook the translations up to the language combobox

main
Adriaan de Groot 6 years ago
parent 4786a91eb8
commit 156a473565

@ -72,14 +72,14 @@ Page
icon.name: "dialog-information" icon.name: "dialog-information"
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4) Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
Kirigami.Theme.textColor: Kirigami.Theme.textColor Kirigami.Theme.textColor: Kirigami.Theme.textColor
visible: true visible: true
onClicked: { onClicked: {
//onClicked: load.source = "file:/usr/share/calamares/branding/default/show.qml" //onClicked: load.source = "file:/usr/share/calamares/branding/default/show.qml"
onClicked: load.source = "about.qml" onClicked: load.source = "about.qml"
} }
} }
Button { Button {
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Support") text: qsTr("Support")
@ -90,7 +90,7 @@ Page
visible: config.supportUrl !== "" visible: config.supportUrl !== ""
onClicked: Qt.openUrlExternally(config.supportUrl) onClicked: Qt.openUrlExternally(config.supportUrl)
} }
Button { Button {
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Known issues") text: qsTr("Known issues")
@ -101,7 +101,7 @@ Page
visible: config.knownIssuesUrl !== "" visible: config.knownIssuesUrl !== ""
onClicked: Qt.openUrlExternally(config.knownIssuesUrl) onClicked: Qt.openUrlExternally(config.knownIssuesUrl)
} }
Button { Button {
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Release notes") text: qsTr("Release notes")
@ -113,7 +113,7 @@ Page
onClicked: load.source = "release_notes.qml" onClicked: load.source = "release_notes.qml"
//onClicked: load.source = "file:/usr/share/calamares/release_notes.qml" //onClicked: load.source = "file:/usr/share/calamares/release_notes.qml"
} }
Button { Button {
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Donate") text: qsTr("Donate")
@ -125,17 +125,17 @@ Page
onClicked: Qt.openUrlExternally(config.donateUrl) onClicked: Qt.openUrlExternally(config.donateUrl)
} }
} }
RowLayout { RowLayout {
id: languageBar id: languageBar
width: parent.width /1.2 width: parent.width /1.2
height: 48 height: 48
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: parent.height /7 anchors.bottomMargin: parent.height /7
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
spacing: Kirigami.Units.largeSpacing* 4 spacing: Kirigami.Units.largeSpacing* 4
Rectangle { Rectangle {
width: parent.width width: parent.width
Layout.fillWidth: true Layout.fillWidth: true
@ -146,21 +146,21 @@ Page
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: "img/language-icon-48px.png" source: "img/language-icon-48px.png"
} }
ComboBox { ComboBox {
id: languages id: languages
anchors.left: image.right anchors.left: image.right
width: languageBar.width /1.1 width: languageBar.width /1.1
textRole: "label" textRole: "label"
currentIndex: 4 //model.currentIndex currentIndex: config.localeIndex
model: config.languagesModel model: config.languagesModel
onCurrentIndexChanged: console.debug(currentText, currentIndex) onCurrentIndexChanged: config.localeIndex = currentIndex
} }
} }
} }
Loader { Loader {
id:load id:load
anchors.fill: parent anchors.fill: parent
} }
} }

Loading…
Cancel
Save