From eb567c39b1d869ca33a8483695e8c81a274f05a2 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 20 Jun 2020 15:12:21 +0200 Subject: Distinct Live and classical modes --- qml/Welcome.qml | 4 +++- qml/mw-ui.qml | 25 ++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) (limited to 'qml') diff --git a/qml/Welcome.qml b/qml/Welcome.qml index 64be714..09d8a5a 100644 --- a/qml/Welcome.qml +++ b/qml/Welcome.qml @@ -24,7 +24,9 @@ import QtQuick.Controls 1 Label { horizontalAlignment: TextInput.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter - text: qsTr("We are going to guide you through a few important steps and help
you with the configuration of your newly installed system.

Now, click on Media sources to go to the first step."); + text: (user == 'live' ? + qsTr("We are going to guide you through a few important information and
help you with to go further with Mageia.

Now, click on %1 to go to the first step.").arg(qsTr("Live mode")) : + qsTr("We are going to guide you through a few important steps and help
you with the configuration of your newly installed system.

Now, click on %1 to go to the first step.").arg(qsTr("Media sources"))); textFormat: Text.RichText color: "white" } diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 169cf1c..000e1e0 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -353,6 +353,25 @@ Rectangle { Links {} } + + ObjectModel { + id: itemModelLive + + // Welcome page + Welcome {} + + // Live mode + Live {} + + // MCC Page + Mcc {} + + // Install software page + Install {} + + // Documentation links + Links {} + } ListView { id: view z: 1 @@ -360,7 +379,7 @@ Rectangle { anchors.leftMargin: 0 anchors.topMargin: 0 anchors { fill: parent; bottomMargin: startCB.implicitHeight +10 } - model: itemModel + model: itemModelLive preferredHighlightBegin: 0; preferredHighlightEnd: 0 highlightRangeMode: ListView.StrictlyEnforceRange orientation: ListView.Horizontal @@ -385,7 +404,7 @@ Rectangle { } Repeater { - model: itemModel.count + model: (user == 'live' ? itemModelLive.count : itemModel.count) Button { Layout.fillHeight: true @@ -399,7 +418,7 @@ Rectangle { color: view.currentIndex == index ? "#2397D4" : "white" } label: Label{ - text: itemModel.get(index).title + text: (user == 'live' ? itemModelLive.get(index).title : itemModel.get(index).title) font.pointSize: 9 color: view.currentIndex == index ? "white" : "#262F45" horizontalAlignment: Text.AlignHCenter -- cgit v1.2.1