diff options
Diffstat (limited to 'raveos-calamares-theme/etc/calamares/branding/raveos/summaryq.qml')
| -rw-r--r-- | raveos-calamares-theme/etc/calamares/branding/raveos/summaryq.qml | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/raveos-calamares-theme/etc/calamares/branding/raveos/summaryq.qml b/raveos-calamares-theme/etc/calamares/branding/raveos/summaryq.qml new file mode 100644 index 0000000..cb00302 --- /dev/null +++ b/raveos-calamares-theme/etc/calamares/branding/raveos/summaryq.qml @@ -0,0 +1,184 @@ +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import "RaveOS" + +Rectangle { + id: osszegzes + color: Stilus.hatter + + property bool lemezTorles: false + + function frissit() { + var valasztas = Global.value("partitionChoices") + lemezTorles = valasztas !== undefined && valasztas !== null && valasztas.install === "erase" + } + + function lepesIndex(cim) { + for (var i = 0; i < ViewManager.rowCount(); ++i) { + if (ViewManager.data(ViewManager.index(i, 0), Qt.DisplayRole) === cim) + return i + } + return -1 + } + + function modosit(cim) { + var cel = lepesIndex(cim) + if (cel >= 0) + ViewManager.goBackTo(cel) + } + + function onActivate() { + frissit() + } + + Component.onCompleted: frissit() + + Flickable { + id: gorgeto + anchors.fill: parent + contentHeight: tartalom.implicitHeight + 80 + clip: true + boundsBehavior: Flickable.StopAtBounds + + ColumnLayout { + id: tartalom + x: 56 + y: 48 + width: gorgeto.width - 112 + spacing: 22 + + Fejlec { + Layout.fillWidth: true + felirat: qsTr("SUMMARY") + cim: qsTr("IS EVERYTHING RIGHT?") + } + + GridLayout { + Layout.fillWidth: true + columns: 3 + columnSpacing: 12 + rowSpacing: 12 + + Repeater { + model: config.summaryModel + + Rectangle { + Layout.fillWidth: true + Layout.preferredWidth: 1 + Layout.fillHeight: true + implicitHeight: blokk.implicitHeight + 32 + color: Stilus.felulet + border.width: 1 + border.color: Stilus.keret + + ColumnLayout { + id: blokk + x: 18 + y: 16 + width: parent.width - 36 + spacing: 10 + + RowLayout { + Layout.fillWidth: true + spacing: 12 + + Text { + Layout.fillWidth: true + text: model.title + elide: Text.ElideRight + color: Stilus.szovegHalvany + font.family: Stilus.font + font.pixelSize: 12 + font.weight: Font.Medium + font.letterSpacing: 1 + font.capitalization: Font.AllUppercase + } + + Text { + text: qsTr("Change") + color: valtHover.hovered ? Stilus.zoldHover : Stilus.zold + font.family: Stilus.font + font.pixelSize: 13 + font.weight: Font.DemiBold + + HoverHandler { + id: valtHover + cursorShape: Qt.PointingHandCursor + } + + TapHandler { + onTapped: osszegzes.modosit(model.title) + } + } + } + + Text { + Layout.fillWidth: true + text: model.message + textFormat: Text.RichText + wrapMode: Text.WordWrap + color: Stilus.szoveg + font.family: Stilus.font + font.pixelSize: 13 + lineHeight: 1.2 + } + } + } + } + } + + Rectangle { + visible: osszegzes.lemezTorles + Layout.fillWidth: true + implicitHeight: figyelmeztetes.implicitHeight + 28 + color: Stilus.sargaPanel + border.width: 1 + border.color: Stilus.sarga + + RowLayout { + id: figyelmeztetes + x: 18 + y: 14 + width: parent.width - 36 + spacing: 12 + + Canvas { + Layout.preferredWidth: 20 + Layout.preferredHeight: 20 + Layout.alignment: Qt.AlignTop + onPaint: { + var c = getContext("2d") + c.reset() + c.strokeStyle = Stilus.sarga + c.lineWidth = 2 + c.beginPath() + c.moveTo(10, 2) + c.lineTo(19, 18) + c.lineTo(1, 18) + c.closePath() + c.moveTo(10, 8) + c.lineTo(10, 12) + c.moveTo(10, 14.5) + c.lineTo(10, 15.5) + c.stroke() + } + } + + Text { + Layout.fillWidth: true + text: qsTr("All data on the selected disk will be permanently erased. This cannot be undone after you press Install.") + wrapMode: Text.WordWrap + color: Stilus.sargaSzoveg + font.family: Stilus.font + font.pixelSize: 14 + lineHeight: 1.2 + } + } + } + } + } +} |