From 118e2ccb00f896f164c8a3bd0bf6b460de9f2293 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 29 Dec 2018 08:54:39 +0100 Subject: Darker theme for slideshow --- qml/mw-ui.qml | 155 ++++++++++++++++++++++++---------------------------------- 1 file changed, 64 insertions(+), 91 deletions(-) diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 87617ea..7499873 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -10,6 +10,18 @@ Rectangle { id: box width: 1000; height: 650 property alias view: view + + Component { + id: slidebackground + LinearGradient { + start: Qt.point(0, 0) + end: Qt.point(0, 800) + gradient: Gradient { + GradientStop { position: 0.0; color: "#2397D4" } + GradientStop { position: 1.0; color: "#262F45" } + } + } + } Rectangle { id: banner opacity: 0.95 @@ -50,16 +62,8 @@ Rectangle { //: the button in buttons bar property var title: qsTr("Welcome") width: view.width; height: view.height - LinearGradient { - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(0, 1000) - gradient: Gradient { - GradientStop { position: 0.0; color: "white" } - GradientStop { position: 1.0; color: "#2397D4" } - } - - } + Loader { sourceComponent: slidebackground ; + anchors.fill: parent} Column { anchors.centerIn: parent anchors.verticalCenter: parent.verticalCenter @@ -71,6 +75,7 @@ Rectangle { text: qsTr("Welcome to Mageia, %1").arg(user)+'\n' font.weight: Font.DemiBold font.pixelSize: Qt.application.font.pixelSize * 1.5 + color: "white" } Label { @@ -78,6 +83,7 @@ Rectangle { 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."); textFormat: Text.RichText + color: "white" } } } @@ -85,23 +91,17 @@ Rectangle { Rectangle { property var title: qsTr("Media sources") width: view.width; height: view.height - LinearGradient { - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(0, 1000) - gradient: Gradient { - GradientStop { position: 0.0; color: "white" } - GradientStop { position: 1.0; color: "#2397D4" } - } - - } + Loader { sourceComponent: slidebackground ; + anchors.fill: parent} Column { anchors.left: parent.left anchors.leftMargin: 20 y: 35 - Label { text: qsTr("Configure software repositories"); font.bold: true; } - Label { text: qsTr("Mageia official repositories contain:"); } + Label { text: qsTr("Configure software repositories"); font.bold: true; + color: "white" } + Label { text: qsTr("Mageia official repositories contain:"); + color: "white" } GridLayout { columns: 2 Rectangle {id: coreBg @@ -126,6 +126,7 @@ Rectangle { text: qsTr("- the free-open-source packages"); wrapMode: Text.WordWrap Layout.maximumWidth: slideshow.width * .6 + color: "white" } Rectangle {id: nonfreeBg @@ -151,6 +152,7 @@ Rectangle { text: qsTr("- closed-source programs, e.g. Nvidia proprietary drivers, non-free drivers for some Wi-Fi cards, etc"); Layout.maximumWidth: slideshow.width * .8 wrapMode: Text.WordWrap + color: "white" } Rectangle {id: taintedBg LinearGradient { @@ -174,6 +176,7 @@ Rectangle { text: qsTr("- these packages (eg audio and video codecs needed for certain multimedia files or commercial DVDs) may infringe on patents or copyright laws in certain countries. "); wrapMode: Text.WordWrap Layout.maximumWidth: slideshow.width * .8 + color: "white" } Rectangle { color: "lightgrey" @@ -187,6 +190,7 @@ Rectangle { text: qsTr("- includes software published after a Mageia release, or another version of software already present and not replaced."); wrapMode: Text.WordWrap Layout.maximumWidth: slideshow.width * .8 + color: "white" } Button { Layout.maximumWidth: slideshow.width * .25 @@ -218,6 +222,7 @@ Rectangle { qsTr("After you have checked and enabled the repositories you need, you can go to the next slide.
"); wrapMode: Text.WordWrap textFormat: Text.RichText + color: "white" Layout.fillWidth: true Layout.maximumWidth: slideshow.width * .85 } @@ -229,6 +234,7 @@ Rectangle { Layout.maximumWidth: slideshow.width * .25 wrapMode: Text.WordWrap font.italic: true + color: "white" } } } @@ -236,26 +242,19 @@ Rectangle { Rectangle { property var title: qsTr("Update") width: view.width; height: view.height - LinearGradient { - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(0, 1000) - gradient: Gradient { - GradientStop { position: 0.0; color: "white" } - GradientStop { position: 1.0; color: "#2397D4" } - } - - } - + Loader { sourceComponent: slidebackground ; + anchors.fill: parent} Column { x:10; y: 30 spacing: 10 - Label { text: qsTr("How Mageia manages updates"); font.bold: true; padding: 10 } + Label { text: qsTr("How Mageia manages updates"); font.bold: true; padding: 10 + color: "white"} Label { 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 the icon below 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 + color: "white" } Button { @@ -296,6 +295,7 @@ Rectangle { text: qsTr("(*) User password is needed") wrapMode: Text.WordWrap font.italic: true + color: "white" } } // MCC Page @@ -303,16 +303,8 @@ Rectangle { //: The button in the buttons bar, shortcut for Mageia Control Center property var title: qsTr("MCC") width: view.width; height: view.height - LinearGradient { - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(0, 1000) - gradient: Gradient { - GradientStop { position: 0.0; color: "white" } - GradientStop { position: 1.0; color: "#2397D4" } - } - - } + Loader { sourceComponent: slidebackground ; + anchors.fill: parent} Column { x: 10; y: 30 @@ -322,6 +314,7 @@ Rectangle { padding: 10 wrapMode: Text.WordWrap textFormat: Text.RichText + color: "white" } Label { padding: 5 @@ -332,7 +325,9 @@ Rectangle { + qsTr("Network Sharing")+"
  • " + qsTr("Local Disks")+"
  • " + qsTr("Security")+"
  • " - + qsTr("Boot")+"
  • "; width: view.width/2; wrapMode: Text.WordWrap;textFormat: Text.RichText + + qsTr("Boot")+""; + width: view.width/2; wrapMode: Text.WordWrap;textFormat: Text.RichText + color: "white" } @@ -367,23 +362,15 @@ Rectangle { text: qsTr("(*) Administrator password is needed") wrapMode: Text.WordWrap font.italic: true + color: "white" } } // Install software page Rectangle { property var title: qsTr("Install software") width: view.width; height: view.height - LinearGradient { - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(0, 1000) - gradient: Gradient { - GradientStop { position: 0.0; color: "white" } - GradientStop { position: 1.0; color: "#2397D4" } - } - - } - + Loader { sourceComponent: slidebackground ; + anchors.fill: parent} Column { //anchors.left: parent.left //anchors.verticalCenter: parent.verticalCenter @@ -394,6 +381,7 @@ Rectangle { padding: 10 font.bold: true wrapMode: Text.WordWrap + color: "white" } 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."); @@ -401,6 +389,7 @@ Rectangle { padding: 10 wrapMode: Text.WordWrap textFormat: Text.RichText + color: "white" } Label { text: qsTr("The next slide shows a small selection of popular applications - any of which may be installed at this point.
    "); @@ -408,6 +397,7 @@ Rectangle { padding: 10 wrapMode: Text.WordWrap textFormat: Text.RichText + color: "white" } Label { text: qsTr("You can find a more detailed list here:"); @@ -415,6 +405,7 @@ Rectangle { padding: 10 wrapMode: Text.WordWrap textFormat: Text.RichText + color: "white" } Button { id: listApplicationsWiki @@ -435,6 +426,7 @@ Rectangle { padding: 10 wrapMode: Text.WordWrap textFormat: Text.RichText + color: "white" } Button { id: rpmdrake @@ -458,23 +450,15 @@ Rectangle { text: qsTr("(*) Administrator password is needed") wrapMode: Text.WordWrap font.italic: true + color: "white" } } // Applications page Rectangle { property var title: qsTr("Applications") width: view.width; height: view.height - LinearGradient { - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(0, 1000) - gradient: Gradient { - GradientStop { position: 0.0; color: "white" } - GradientStop { position: 1.0; color: "#2397D4" } - } - - } - + Loader { sourceComponent: slidebackground ; + anchors.fill: parent} Column { Rectangle { @@ -600,6 +584,7 @@ Rectangle { leftPadding:5 text: title font.weight: Font.DemiBold + color: "white" } Label { leftPadding:5 @@ -608,6 +593,7 @@ Rectangle { font.pixelSize: Qt.application.font.pixelSize * .9 width: view.width - (200 + 32 +30 + 100) wrapMode: Text.WordWrap + color: "white" } } @@ -623,6 +609,7 @@ Rectangle { anchors.centerIn: parent text: repo font.pixelSize: Qt.application.font.pixelSize * .8 + color: "white" } } } @@ -692,17 +679,8 @@ Rectangle { Rectangle { property var title: qsTr("Your configuration") width: view.width; height: view.height - LinearGradient { - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(0, 1000) - gradient: Gradient { - GradientStop { position: 0.0; color: "white" } - GradientStop { position: 1.0; color: "#2397D4" } - } - - } - + Loader { sourceComponent: slidebackground ; + anchors.fill: parent} ListView { id: confList anchors.fill: parent @@ -711,6 +689,7 @@ Rectangle { delegate: Label { text: name textFormat: Text.RichText + color: "white" } } } @@ -718,17 +697,8 @@ Rectangle { Rectangle { property var title: qsTr("More information") width: view.width; height: view.height - LinearGradient { - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(0, 1000) - gradient: Gradient { - GradientStop { position: 0.0; color: "white" } - GradientStop { position: 1.0; color: "#2397D4" } - } - - } - + Loader { sourceComponent: slidebackground ; + anchors.fill: parent} Column { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter @@ -741,6 +711,7 @@ Rectangle { text: qsTr("Documentation") wrapMode: Text.WordWrap font.bold: true + color: "white" } Label { horizontalAlignment: TextInput.AlignHCenter @@ -748,6 +719,7 @@ Rectangle { text: qsTr("Support") wrapMode: Text.WordWrap font.bold: true + color: "white" } Label { horizontalAlignment: TextInput.AlignHCenter @@ -755,6 +727,7 @@ Rectangle { text: qsTr("Community") wrapMode: Text.WordWrap font.bold: true + color: "white" } Repeater{ model: [{'name': qsTr("Release notes"), 'url': qsTr("https://wiki.mageia.org/en/Mageia_7_Release_Notes")}, @@ -808,7 +781,7 @@ Rectangle { id: buttonbox width: banner.width; height: 46 anchors { top: banner.bottom; } - color: "#2397D4" + color: "#262F45" Row { anchors.centerIn: parent @@ -820,7 +793,7 @@ Rectangle { Rectangle { width: banner.width/9; height: 35 radius: 5 - color: view.currentIndex == index ? "#262F45" : "white" + color: view.currentIndex == index ? "#2397D4" : "white" Label{ anchors.verticalCenter: parent.verticalCenter text: itemModel.get(index).title -- cgit v1.2.1