diff options
author | Papoteur <papoteur@mageia.org> | 2018-12-15 13:02:57 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2018-12-17 10:19:29 +0100 |
commit | f2b8ab8372e3465a1af70831c82199cd7379a6db (patch) | |
tree | 74e8051d4b537c40808e9d6c286c649147843aa7 | |
parent | fa5fa70878c63ceacc05e50bd2e1050bc353f953 (diff) | |
download | mageiawelcome-f2b8ab8372e3465a1af70831c82199cd7379a6db.tar mageiawelcome-f2b8ab8372e3465a1af70831c82199cd7379a6db.tar.gz mageiawelcome-f2b8ab8372e3465a1af70831c82199cd7379a6db.tar.bz2 mageiawelcome-f2b8ab8372e3465a1af70831c82199cd7379a6db.tar.xz mageiawelcome-f2b8ab8372e3465a1af70831c82199cd7379a6db.zip |
Modify presentation and some texts
-rw-r--r-- | qml/mageiawelcome.py | 5 | ||||
-rw-r--r-- | qml/mw-ui.qml | 304 |
2 files changed, 159 insertions, 150 deletions
diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py index 0303a1c..1f366d3 100644 --- a/qml/mageiawelcome.py +++ b/qml/mageiawelcome.py @@ -44,11 +44,11 @@ class ConfList(QAbstractListModel): desktop = os.getenv("XDG_CURRENT_DESKTOP") self.configuration = [ - {'name': self.tr("Congratulations! You have completed the installation of {}").format(release)}, + {'name': self.tr("<b>Congratulations!</b><BR />You have completed the installation of {}").format(release)}, {'name': self.tr("You are using linux kernel: {}").format(kernel)}, {'name': self.tr("Your system architecture is: {}").format(arch)}, {'name': self.tr("You are now using the Desktop: {}").format(desktop)}, - {'name': self.tr("Your user's id is: {}").format(os.getuid())}, + {'name': self.tr("Your user id is: {}").format(os.getuid())}, ] def data(self, index, role=Qt.DisplayRole): @@ -88,7 +88,6 @@ class Norun(QObject): QObject.__init__(self) self.home = os.getenv("HOME") self.conffile = self.home + "/.config/mageiawelcome/norun.flag" - print(self.conffile, os.path.exists(self.conffile)) @pyqtSlot(bool) def setRunAtLaunch(self, checked): diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 7581a32..8778692 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -8,7 +8,7 @@ import QtGraphicalEffects 1 Rectangle { id: box - width: 800; height: 550 + width: 1000; height: 700 property alias view: view Rectangle { id: banner @@ -49,19 +49,20 @@ Rectangle { } } + Column { + anchors.centerIn: parent - Label { - text: qsTr("Welcome to Mageia, %1").arg(user) - font.bold: true - anchors.horizontalCenter: parent.horizontalCenter - } + Label { + text: qsTr("Welcome to Mageia, %1").arg(user)+'\n\n' + font.bold: true + } - Label { - text: qsTr("We are going to guide you through a few important steps<BR /> -and help you with the configuration of your newly installed system. -<BR />Now, click on <i>Media sources</i> to go to the first step."); - textFormat: Text.RichText - anchors.centerIn: parent + Label { + text: qsTr("We are going to guide you through a few important steps<BR /> + and help you with the configuration of your newly installed system. + <BR />Now, click on <i>Media sources</i> to go to the first step."); + textFormat: Text.RichText + } } } // Configure source page @@ -86,9 +87,8 @@ and help you with the configuration of your newly installed system. Label { text: qsTr("Configure software repositories"); font.bold: true; } Label { text: qsTr("Mageia official repositories contain:"); } GridLayout { - columns: 3 + columns: 2 Rectangle {id: coreBg - radius: 5 LinearGradient { anchors.fill: parent start: Qt.point(0, 0) @@ -99,23 +99,20 @@ and help you with the configuration of your newly installed system. } } width: 80; - height: 20 + height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { text: qsTr("core"); } + Label { + anchors.centerIn: parent + text: qsTr("core"); } } Label { text: qsTr("- the free-open-source packages"); wrapMode: Text.WordWrap Layout.maximumWidth: slideshow.width * .6 } - Label { - text: "" - - } Rectangle {id: nonfreeBg - radius: 5 LinearGradient { anchors.fill: parent start: Qt.point(0, 0) @@ -125,12 +122,13 @@ and help you with the configuration of your newly installed system. GradientStop { position: 1.0; color: "darkred" } } } - width: 80; height: 20 + width: 80; height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { text: qsTr("nonfree"); - color: "white" - wrapMode: Text.WordWrap} + Label { + anchors.centerIn: parent + text: qsTr("nonfree"); + color: "white"} } Label { width: parent.width @@ -138,20 +136,7 @@ and help you with the configuration of your newly installed system. Layout.maximumWidth: slideshow.width * .6 wrapMode: Text.WordWrap } - Button { - Layout.maximumWidth: slideshow.width * .25 - objectName: "launch" - onClicked: { launch.command(["drakrpm-edit-media",])} - style: ButtonStyle { - label: Label { - text: qsTr("Edit software repositories")+" *"; - width: parent.width - wrapMode: Text.WordWrap - } - } - } Rectangle {id: taintedBg - radius: 5 LinearGradient { anchors.fill: parent start: Qt.point(0, 0) @@ -161,10 +146,12 @@ and help you with the configuration of your newly installed system. GradientStop { position: 1.0; color: "darkred" } } } - width: 80; height: 20 + width: 80; height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { text: qsTr("tainted"); + Label { + anchors.centerIn: parent + text: qsTr("tainted"); color: "white" } } Label { @@ -172,36 +159,41 @@ and help you with the configuration of your newly installed system. wrapMode: Text.WordWrap Layout.maximumWidth: slideshow.width * .6 } - Label { - text: "" - - } Rectangle { color: "lightgrey" - radius:5 - width: 80; height: 20 + width: 80; height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { text: qsTr("backports"); } + Label { anchors.centerIn: parent + text: qsTr("backports"); } } Label { text: qsTr("- includes sofware published after a Mageia release, or another version of sofware already present and not replaced."); wrapMode: Text.WordWrap Layout.maximumWidth: slideshow.width * .6 } - Label { - text: "(*) Administrator password is needed" + Button { Layout.maximumWidth: slideshow.width * .25 - wrapMode: Text.WordWrap - font.italic: true + Layout.columnSpan: 2 + Layout.alignment: Qt.AlignHCenter + objectName: "launch" + onClicked: { launch.command(["drakrpm-edit-media",])} + style: ButtonStyle { + label: Label { + text: qsTr("Edit software repositories")+" *"; + width: parent.width + wrapMode: Text.WordWrap + } + } } Rectangle {id: noteBg color: "gold"; width: 70 - height: 20 + height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { text: qsTr("Note! ") + Label { anchors.centerIn: parent + text: qsTr("Note! ") } } Label { text: qsTr("If you enabled the online repositories during installation, some media sources should be installed already. If you didn't, we will now configure these online repositories. @@ -211,15 +203,21 @@ and help you with the configuration of your newly installed system. wrapMode: Text.WordWrap textFormat: Text.RichText Layout.fillWidth: true - Layout.columnSpan: 2 Layout.maximumWidth: slideshow.width - 100 - } + } + } + + Label { + text: qsTr("(*) Administrator password is needed") + Layout.maximumWidth: slideshow.width * .25 + wrapMode: Text.WordWrap + font.italic: true + } } } - } // Update page Rectangle { - property var title: "Update" + property var title: qsTr("Update") width: view.width; height: view.height LinearGradient { anchors.fill: parent @@ -233,21 +231,17 @@ and help you with the configuration of your newly installed system. } Column { - anchors {left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 10} - Label { text: qsTr("Update"); font.bold: true; } + Label { text: qsTr("How Mageia manages updates"); font.bold: true; padding: 10 } Label { - width: slideshow.width * .7 + width: slideshow.width * .9 + padding: 10 text: qsTr("Mageia provides software which may be updated in order to fix bugs or security issues. -It is highly recommended that you update your system regularly. An Update icon will appear in your task bar when new updates are available. To run the updates, just click on this icon and give your user password or use the Software Manager (root password). This is a background process and you will be able to use your computer normally during the updates."); +It is highly recommended that you update your system regularly. An Update icon will appear in your task bar when new updates are available. To run the updates, just click on this icon and give your user password or use the Software Manager (root password). This is a background process and you will be able to use your computer normally during the updates."+"\n"); wrapMode: Text.WordWrap } - } - Column { - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 10 + Button { - width: view.width * .25; + width: view.width * .35; objectName: "launch" onClicked:{ launch.command(["drakrpm-update",])} style: ButtonStyle { @@ -258,14 +252,16 @@ It is highly recommended that you update your system regularly. An Update icon w } } } - Label { - width: view.width * .27; - text: qsTr("(*) User password is needed") - wrapMode: Text.WordWrap - font.italic: true - } } + Label { + anchors {bottom: parent.bottom; horizontalCenter: parent.horizontalCenter} + width: view.width * .5; + padding: 5 + text: qsTr("(*) User password is needed") + wrapMode: Text.WordWrap + font.italic: true + } } // MCC Page Rectangle { @@ -283,26 +279,26 @@ It is highly recommended that you update your system regularly. An Update icon w } Column { - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 5 Label { - text: qsTr("Mageia Control Center (aka drakconf) is a set of tools to help you configure your system.") - width: view.width * 0.6 + text: qsTr("<b>Mageia Control Center</b> (aka drakconf) is a set of tools to help you configure your system.") + width: view.width * 0.9 + padding: 10 wrapMode: Text.WordWrap + textFormat: Text.RichText } - Label {text: "<ul><li>"+qsTr("Software Management")+"</li><li>" + Label { + padding: 5 + text: "<ul><li>"+qsTr("Software Management")+"</li><li>" + qsTr("Hardware")+"</li><li>" + qsTr("Network and Internet")+"</li><li>" + qsTr("System")+"</li><li>" + qsTr("Network Sharing")+"</li><li>" + qsTr("Local Disks")+"</li><li>" + qsTr("Security")+"</li><li>" - + qsTr("Boot")+"</li></ul>"; width: view.width/2; wrapMode: Text.WordWrap;textFormat: Text.RichText} + + qsTr("Boot")+"</li></ul>"; width: view.width/2; wrapMode: Text.WordWrap;textFormat: Text.RichText } - Column { - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter + + Button { id: mcc objectName: "launch" @@ -314,23 +310,25 @@ It is highly recommended that you update your system regularly. An Update icon w } } } - Button { - objectName: "link" - onClicked: { link.weblink("https://www.mageia.org/doc")} - style: ButtonStyle { - label: Label { - text: qsTr("MCC documentation"); - wrapMode: Text.WordWrap - } - } - } - Label { - text: qsTr("(*) Administrator password is needed") - wrapMode: Text.WordWrap - width: view.width * .25; - font.italic: true - } - } + Button { + objectName: "link" + onClicked: { link.weblink("https://www.mageia.org/doc")} + style: ButtonStyle { + label: Label { + text: qsTr("MCC documentation"); + wrapMode: Text.WordWrap + } + } + } + } + Label { + text: qsTr("(*) Administrator password is needed") + anchors {bottom: parent.bottom; horizontalCenter: parent.horizontalCenter} + wrapMode: Text.WordWrap + padding: 5 + width: view.width * .4; + font.italic: true + } } // Install software page Rectangle { @@ -348,30 +346,33 @@ It is highly recommended that you update your system regularly. An Update icon w } Column { - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 10 + //anchors.left: parent.left + //anchors.verticalCenter: parent.verticalCenter Label { text: qsTr("Install and remove software") - width: slideshow.width * .7 + width: slideshow.width * .9 + padding: 5 font.bold: true wrapMode: Text.WordWrap } Label { text: qsTr("With Mageia, you will find the software in the media repositories. Mageia users simply access these media via one of the Software Managers."); - width: slideshow.width * .7; + width: slideshow.width * .9; + padding: 5 wrapMode: Text.WordWrap textFormat: Text.RichText } Label { - text: qsTr("Next slide is a small selection of popular applications - any of which may be installed at this point.<BR/>"); - width: slideshow.width * .7; + text: qsTr("Next slide shows a small selection of popular applications - any of which may be installed at this point.<BR/>"); + width: slideshow.width * .9; + padding: 5 wrapMode: Text.WordWrap textFormat: Text.RichText } Label { text: qsTr("You can find a more detailed list here:"); - width: slideshow.width * .7; + width: slideshow.width * .9; + padding: 5 wrapMode: Text.WordWrap textFormat: Text.RichText } @@ -382,41 +383,40 @@ It is highly recommended that you update your system regularly. An Update icon w style: ButtonStyle { label: Label { text: qsTr("List of applications (wiki)"); - width: slideshow.width * .3 + width: slideshow.width * .5 wrapMode: Text.WordWrap } } } Label { - text: qsTr("We will tell you how you can get in touch with the community in the <i>More information</i> tab."); - width: slideshow.width * .7; + text: "<BR />"+qsTr("You can find details of how to contact the community by selecting the <i>More information</i> tab."); + width: slideshow.width * .9; + padding: 5 wrapMode: Text.WordWrap textFormat: Text.RichText } - } - Column { - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - Button { - id: rpmdrake - objectName: "launch" - onClicked: { - launch.command(["rpmdrake",])} - style: ButtonStyle { - label: Label { - text: qsTr("RPMdrake")+" *"; - width: slideshow.width * .25 - wrapMode: Text.WordWrap - } + Button { + id: rpmdrake + objectName: "launch" + onClicked: { + launch.command(["rpmdrake",])} + style: ButtonStyle { + label: Label { + text: qsTr("RPMdrake")+" *"; + width: slideshow.width * .35 + wrapMode: Text.WordWrap } } - Label { - text: qsTr("(*) Administrator password is needed") - width: slideshow.width * .25 - wrapMode: Text.WordWrap - font.italic: true - } } + } + Label { + anchors {bottom: parent.bottom; horizontalCenter: parent.horizontalCenter} + text: qsTr("(*) Administrator password is needed") + width: slideshow.width * .45 + padding: 5 + wrapMode: Text.WordWrap + font.italic: true + } } // Applications page Rectangle { @@ -441,8 +441,11 @@ It is highly recommended that you update your system regularly. An Update icon w width: view.width height: 60 color: "gold" - Label {anchors {verticalCenter: parent.verticalCenter;} - text: qsTr("Here is a small selection of popular applications - any of which may be installed at this point.")+"<BR />"+"Tou can install the application or launch it when already installed" + "<BR/>" + "Be sure you have enabled <i>Media sources</i>" + Label {anchors {verticalCenter: parent.verticalCenter; } + leftPadding: 15 + text: qsTr("Here is a small selection of popular applications - any of which may be installed at this point.")+"<BR />"+ + "You can install the application or launch it when already installed." + "<BR/>" + + "Ensure that you have enabled the <i>Media sources</i>" textFormat: Text.RichText } } @@ -456,7 +459,7 @@ It is highly recommended that you update your system regularly. An Update icon w id: catHighlight Rectangle { width: 190 - height: 25 + height: 30 anchors.horizontalCenter: parent.horizontalCenter color: "#2397D4" y: categoriesList.currentItem.y; @@ -465,7 +468,7 @@ It is highly recommended that you update your system regularly. An Update icon w ListView { id:categoriesList - anchors {left: parent.left;margins: 5} + anchors {left: parent.left;} width: 190 highlight: catHighlight highlightFollowsCurrentItem: false @@ -482,9 +485,11 @@ It is highly recommended that you update your system regularly. An Update icon w height: 25 * 9 delegate: Rectangle{ width: parent.width - height: 25 + height: 30 color:"#202397D4" - Label {id: catLabel;text: modelData.name ; + Label {id: catLabel; + text: modelData.name ; + padding: 5 color: categoriesList.currentIndex === index ? "white" : "black"} MouseArea { anchors.centerIn: parent @@ -527,7 +532,6 @@ It is highly recommended that you update your system regularly. An Update icon w Component.onCompleted: { var rowCount = appList.count; items.remove(0,rowCount); - console.log("Init") var pattern = /featured/g; for( var i = 0;i < rowCount;i++ ) { @@ -648,6 +652,7 @@ It is highly recommended that you update your system regularly. An Update icon w model: ConfList delegate: Label { text: name + textFormat: Text.RichText } } } @@ -667,28 +672,28 @@ It is highly recommended that you update your system regularly. An Update icon w } Column { - anchors.left: parent.left + anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 10 - Label { text: "More information"; font.bold: true; } - Grid { columns: 3 - spacing: 10 + spacing: view.width * .025 Label { width: view.width * .3 text: qsTr("Documentation") wrapMode: Text.WordWrap + font.bold: true } Label { width: view.width * .3 text: qsTr("Support") wrapMode: Text.WordWrap + font.bold: true } Label { width: view.width * .3 text: qsTr("Community") wrapMode: Text.WordWrap + font.bold: true } Repeater{ model: [{'name': qsTr("Release notes"), 'url': qsTr("https://wiki.mageia.org/en/Mageia_7_Release_Notes")}, @@ -708,10 +713,13 @@ It is highly recommended that you update your system regularly. An Update icon w objectName: "link" onClicked: { link.weblink(modelData.url)} style: ButtonStyle { - label: Label {text: modelData.name; width: parent.width; wrapMode: Text.WordWrap } + label: Label { + text: modelData.name + width: parent.width + wrapMode: Text.WordWrap } } } - } + } } } } @@ -736,7 +744,7 @@ It is highly recommended that you update your system regularly. An Update icon w } Rectangle { id: buttonbox - width: banner.width; height: 42 + width: banner.width; height: 46 anchors { top: banner.bottom; } color: "#2397D4" @@ -752,6 +760,7 @@ It is highly recommended that you update your system regularly. An Update icon w radius: 5 color: view.currentIndex == index ? "#262F45" : "white" Label{ + anchors.verticalCenter: parent.verticalCenter text: itemModel.get(index).title font.pointSize: 8 width: parent.width @@ -772,6 +781,7 @@ It is highly recommended that you update your system regularly. An Update icon w Row { anchors.right: box.right anchors.bottom: box.bottom + anchors.margins: 5 CheckBox { text: qsTr("Show this window at startup") checked: startupcheck |