summaryrefslogtreecommitdiffstats
path: root/qml/mw-ui.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml/mw-ui.qml')
-rw-r--r--qml/mw-ui.qml833
1 files changed, 454 insertions, 379 deletions
diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml
index 334c06d..40fa2e4 100644
--- a/qml/mw-ui.qml
+++ b/qml/mw-ui.qml
@@ -5,20 +5,34 @@ import QtQuick.Layouts 1.3
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtGraphicalEffects 1
+import QtQuick.Window 2
+import Qt.labs.settings 1.0
+import QtQuick.Dialogs 1.1
Rectangle {
id: box
- width: 1000; height: 650
+ width: 1000 * Screen.devicePixelRatio; height: 650 * Screen.devicePixelRatio
property alias view: view
+ //: For Right to Left language, set this string to RTL
+ property var direction: qsTr("LTR")
+ LayoutMirroring.enabled: (direction == "LTR" ? false : true)
+ // for tests
+ //LayoutMirroring.enabled: true
+ LayoutMirroring.childrenInherit: true
+
+ Settings {
+ property alias width: box.width
+ property alias height: box.height
+ }
Component {
id: slidebackground
LinearGradient {
start: Qt.point(0, 0)
- end: Qt.point(0, 800)
+ end: Qt.point(0, box.height)
gradient: Gradient {
- GradientStop { position: 0.0; color: "#2397D4" }
- GradientStop { position: 1.0; color: "#262F45" }
+ GradientStop { position: 1.0; color: "#2397D4" }
+ GradientStop { position: 0.0; color: "#262F45" }
}
}
}
@@ -94,150 +108,201 @@ Rectangle {
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;
- color: "white" }
- Label { text: qsTr("Mageia official repositories contain:");
- color: "white" }
- GridLayout {
- columns: 2
- Rectangle {id: coreBg
- LinearGradient {
- anchors.fill: parent
- start: Qt.point(0, 0)
- end: Qt.point(0, 20)
- gradient: Gradient {
- GradientStop { position: 0.0; color: "lightgreen" }
- GradientStop { position: 1.0; color: "green" }
- }
- }
- width: 80;
- height: 30
+ //Column {
+ //anchors.left: parent.left
+ // y: 10
+ GridLayout {
+ columns: 2
+ Label {
+ Layout.columnSpan: 2
+ Layout.topMargin: 10
+ Layout.leftMargin: 10
+ text: qsTr("Configure software repositories"); font.bold: true;
+ color: "white" }
+ Label {
+ Layout.columnSpan: 2
+ Layout.topMargin: 10
+ Layout.leftMargin: 10
+ text: qsTr("Mageia official repositories contain:");
+ color: "white" }
+ Button {id: coreBg
+ Layout.margins: 5
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
- Label {
- anchors.centerIn: parent
- text: qsTr("core"); }
+ //height: Qt.application.font.pixelSize * 1.3
+ style: ButtonStyle {
+ label: Label {
+ horizontalAlignment: TextInput.AlignHCenter
+ //: Should be as displayed in software manager, thus in general not translated
+ text: qsTr("core");
+ font.bold: true; color: "black";
+ }
+ background: Rectangle {
+ LinearGradient {
+ anchors.fill: parent
+ start: Qt.point(0, 0)
+ end: Qt.point(0, 20)
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "lightgreen" }
+ GradientStop { position: 1.0; color: "green" }
+ }
+ }
+ }
+
+ }
}
Label {
text: qsTr("- the free-open-source packages");
wrapMode: Text.WordWrap
- Layout.maximumWidth: slideshow.width * .6
+ Layout.maximumWidth: slideshow.width -20 - coreBg.width
color: "white"
}
-
- Rectangle {id: nonfreeBg
- LinearGradient {
- anchors.fill: parent
- start: Qt.point(0, 0)
- end: Qt.point(0, 20)
- gradient: Gradient {
- GradientStop { position: 0.0; color: "red" }
- GradientStop { position: 1.0; color: "darkred" }
- }
- }
- width: 80; height: 30
+ Button {
+ Layout.margins: 5
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
- Label {
- anchors.centerIn: parent
- text: qsTr("nonfree");
- color: "white"}
+ style: ButtonStyle {
+ label: Label {
+ horizontalAlignment: TextInput.AlignHCenter
+ //: Should be as displayed in software manager, thus in general not translated
+ text: qsTr("nonfree");
+ font.bold: true; color: "white";
+ }
+ background: Rectangle {
+ LinearGradient {
+ anchors.fill: parent
+ start: Qt.point(0, 0)
+ end: Qt.point(0, 20)
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "red" }
+ GradientStop { position: 1.0; color: "darkred" }
+ }
+ }
+ }
+
}
+ }
Label {
width: parent.width
text: qsTr("- closed-source programs, e.g. Nvidia proprietary drivers, non-free drivers for some Wi-Fi cards, etc");
- Layout.maximumWidth: slideshow.width * .8
+ Layout.maximumWidth: slideshow.width - 110
wrapMode: Text.WordWrap
color: "white"
}
- Rectangle {id: taintedBg
- LinearGradient {
- anchors.fill: parent
- start: Qt.point(0, 0)
- end: Qt.point(0, 20)
- gradient: Gradient {
- GradientStop { position: 0.0; color: "red" }
- GradientStop { position: 1.0; color: "darkred" }
- }
- }
- width: 80; height: 30
+ Button {
+ Layout.margins: 5
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
- Label {
- anchors.centerIn: parent
- text: qsTr("tainted");
- color: "white" }
+ style: ButtonStyle {
+ label: Label {
+ horizontalAlignment: TextInput.AlignHCenter
+ //: Should be as displayed in software manager, thus in general not translated
+ text: qsTr("tainted");
+ font.bold: true; color: "white";
+ }
+ background: Rectangle {
+ LinearGradient {
+ anchors.fill: parent
+ start: Qt.point(0, 0)
+ end: Qt.point(0, 20)
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "red" }
+ GradientStop { position: 1.0; color: "darkred" }
+ }
+ }
+ }
+
}
+ }
Label {
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
+ Layout.maximumWidth: slideshow.width -110
color: "white"
}
- Rectangle {
- color: "lightgrey"
- width: 80; height: 30
+ Button {
+ Layout.margins: 5
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
- Label { anchors.centerIn: parent
- text: qsTr("backports"); }
+ style: ButtonStyle {
+ label: Label {
+ horizontalAlignment: TextInput.AlignHCenter
+ //: Should be as displayed in software manager, thus in general not translated
+ text: qsTr("backports");
+ font.bold: true; color: "black";
+ }
+ background: Rectangle {
+ LinearGradient {
+ anchors.fill: parent
+ start: Qt.point(0, 0)
+ end: Qt.point(0, 20)
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "lightgray" }
+ GradientStop { position: 1.0; color: "darkgray" }
+ }
+ }
+ }
+
}
+ }
Label {
- text: qsTr("- includes software published after a Mageia release, or another version of software already present and not replaced.");
+ text: qsTr("- include new versions of packages, and new packages, that do not meet the updates policy.");
wrapMode: Text.WordWrap
- Layout.maximumWidth: slideshow.width * .8
+ Layout.maximumWidth: slideshow.width -110
color: "white"
}
Button {
- Layout.maximumWidth: slideshow.width * .25
- Layout.columnSpan: 2
- Layout.alignment: Qt.AlignHCenter
- objectName: "launch"
- onClicked: { launch.command(["drakrpm-edit-media",])}
+ Layout.margins: 5
+ Layout.alignment: Qt.AlignTop
+ Layout.fillWidth: true
style: ButtonStyle {
label: Label {
- text: qsTr("Edit software repositories")+" *";
- width: parent.width
- wrapMode: Text.WordWrap
- color: "black"
+ horizontalAlignment: TextInput.AlignHCenter
+ text: qsTr("Note! ");
+ font.bold: true; color: "black";
+ }
+ background: Rectangle {
+ color: "#e6c200";
}
+
}
}
- Rectangle {id: noteBg
- color: "gold";
- width: 70
- height: 30
- Layout.alignment: Qt.AlignTop
- Layout.fillWidth: true
- 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. Otherwise, we will now configure these online repositories.
- If this computer will have access to the Internet, you can delete the <i>cdrom</i> entry from the list of repositories.")+"<BR /><BR />"+
- qsTr("Now, please enable or disable the online repositories of your choice: click on the <i>Edit software repositories</i> button. Select at least the <i>release</i> and <i>updates</i> pair. <i>Debug</i> and <i>Testing</i> are for special cases.")+"<BR />"+
- qsTr("After you have checked and enabled the repositories you need, you can go to the next slide.<BR />");
+ If this computer will have access to the Internet, you can delete the <i>Local</i> entry from the list of repositories.");
+ wrapMode: Text.WordWrap
+ textFormat: Text.RichText
+ color: "white"
+ Layout.fillWidth: true
+ Layout.maximumWidth: slideshow.width - 110
+ }
+ Label { text: qsTr("Now, please enable or disable the online repositories of your choice: click on the <i>Edit software repositories</i> button. Select at least the <i>release</i> and <i>updates</i> pair. <i>Debug</i> and <i>Testing</i> are for special cases.")+"<BR />"+
+ 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
+ Layout.maximumWidth: slideshow.width - 10
+ Layout.columnSpan: 2
+ Layout.margins: 10
}
+ MButton {
+ Layout.maximumWidth: slideshow.width * .40
+ Layout.columnSpan: 2
+ Layout.alignment: Qt.AlignHCenter
+ objectName: "launch"
+ onMbuttonClicked: { launch.command(["drakrpm-edit-media",])}
+ buttonText: qsTr("Edit software sources")+" *"
+ }
}
Label {
- x: 84
+ anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 }
text: qsTr("(*) Administrator password is needed.")
- Layout.maximumWidth: slideshow.width * .25
- wrapMode: Text.WordWrap
+ Layout.maximumWidth: slideshow.width * .4
font.italic: true
color: "white"
}
- }
+
}
// Update page
Rectangle {
@@ -246,55 +311,37 @@ Rectangle {
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;
+ topPadding: 30 ; leftPadding: 20
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");
+ width: slideshow.width - 40
+ padding: 20
+ 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 {
- x:10
- width: view.width * .18;
+ MButton {
+ anchors.horizontalCenter: parent.horizontalCenter
objectName: "launch"
- onClicked:{ launch.command(["drakrpm-update",])}
- style: ButtonStyle {
- label: Label {
- horizontalAlignment: TextInput.AlignHCenter
- text: qsTr("Check system updates")+" *";
- width: parent.width
- wrapMode: Text.WordWrap
- color: "black"
- }
- }
+ onMbuttonClicked: { launch.command(["drakrpm-update",])}
+ buttonText: qsTr("Check system updates")+" *"
}
- Button {
- x:10
- width: view.width * .18;
+ MButton {
+ anchors.horizontalCenter: parent.horizontalCenter
objectName: "link"
- onClicked:{ link.weblink("https://advisories.mageia.org/")}
- style: ButtonStyle {
- label: Label {
- horizontalAlignment: TextInput.AlignHCenter
- //: (en) indicates that the content of the link is in English
- text: qsTr("Advisories of updates (en)");
- width: parent.width
- wrapMode: Text.WordWrap
- color: "black"
- }
- }
+ //: (en) indicates that the content of the link is in English
+ onMbuttonClicked: { link.weblink("https://advisories.mageia.org/")}
+ buttonText: qsTr("Advisories of updates (en)")
}
}
Label {
- anchors {bottom: parent.bottom; }
- anchors.bottomMargin: 10
- x:20
+ anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 }
text: qsTr("(*) User password is needed")
wrapMode: Text.WordWrap
font.italic: true
@@ -322,6 +369,7 @@ Rectangle {
}
Label {
padding: 5
+ anchors.horizontalCenter: parent.horizontalCenter
text: "<ul><li>"+qsTr("Software Management")+"</li><li>"
+ qsTr("Hardware")+"</li><li>"
+ qsTr("Network and Internet")+"</li><li>"
@@ -330,47 +378,25 @@ Rectangle {
+ qsTr("Local Disks")+"</li><li>"
+ qsTr("Security")+"</li><li>"
+ qsTr("Boot")+"</li></ul>";
- width: view.width/2; wrapMode: Text.WordWrap;textFormat: Text.RichText
+ wrapMode: Text.WordWrap;textFormat: Text.RichText
color: "white"
}
-
- Button {
- id: mcc
- x: 10
- width: view.width * .18;
+ MButton {
+ anchors.horizontalCenter: parent.horizontalCenter
objectName: "launch"
- onClicked: { launch.command(["drakconf"])}
- style: ButtonStyle {
- label: Label {
- horizontalAlignment: TextInput.AlignHCenter
- text: qsTr("Mageia Control Center")+" *";
- width: parent.width
- wrapMode: Text.WordWrap
- color: "black"
- }
- }
+ onMbuttonClicked: { launch.command(["drakconf",])}
+ buttonText: qsTr("Mageia Control Center")+" *"
+ }
+ MButton {
+ anchors.horizontalCenter: parent.horizontalCenter
+ objectName: "link"
+ onMbuttonClicked: { link.weblink("https://www.mageia.org/doc")}
+ buttonText: qsTr("MCC documentation")
}
- Button {
- x: 10
- width: view.width * .18;
- objectName: "link"
- onClicked: { link.weblink("https://www.mageia.org/doc")}
- style: ButtonStyle {
- label: Label {
- horizontalAlignment: TextInput.AlignHCenter
- text: qsTr("MCC documentation");
- width: parent.width
- wrapMode: Text.WordWrap
- color: "black"
- }
- }
- }
}
Label {
- anchors {bottom: parent.bottom; }
- anchors.bottomMargin: 10
- x:20
+ anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 }
text: qsTr("(*) Administrator password is needed")
wrapMode: Text.WordWrap
font.italic: true
@@ -384,12 +410,10 @@ Rectangle {
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
Column {
- //anchors.left: parent.left
- //anchors.verticalCenter: parent.verticalCenter
- x:10; y: 30
Label {
text: qsTr("Install and remove software")
- width: slideshow.width * .9
+ width: slideshow.width
+ topPadding: 30; leftPadding: 20;
padding: 10
font.bold: true
wrapMode: Text.WordWrap
@@ -397,70 +421,46 @@ Rectangle {
}
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 * .9;
- padding: 10
+ width: slideshow.width
+ padding: 20
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: "white"
}
+ MButton {
+ anchors.left: parent.left; anchors.leftMargin: 20;
+ width: slideshow.width * .35
+ objectName: "launch"
+ onMbuttonClicked: { launch.command(["rpmdrake",])}
+ buttonText: qsTr("RPMdrake")+" *"
+ }
Label {
text: qsTr("The next slide shows a small selection of popular applications - any of which may be installed at this point.<BR/>");
- width: slideshow.width * .9;
- padding: 10
+ width: slideshow.width
+ padding: 20
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: "white"
}
Label {
text: qsTr("You can find a more detailed list here:");
- width: slideshow.width * .9;
- padding: 10
+ width: slideshow.width
+ padding: 20
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: "white"
}
- Button {
- id: listApplicationsWiki
- x: 10
+ MButton {
+ anchors.left: parent.left; anchors.leftMargin: 20
+ width: slideshow.width * .35
objectName: "link"
- onClicked: { link.weblink(qsTr("https://wiki.mageia.org/en/List_of_applications"))}
- style: ButtonStyle {
- label: Label {
- text: qsTr("List of applications (wiki)");
- width: slideshow.width * .5
- wrapMode: Text.WordWrap
- color: "black"
- }
- }
- }
- Label {
- 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: 10
- wrapMode: Text.WordWrap
- textFormat: Text.RichText
- color: "white"
- }
- Button {
- id: rpmdrake
- x: 10
- objectName: "launch"
- onClicked: {
- launch.command(["rpmdrake",])}
- style: ButtonStyle {
- label: Label {
- text: qsTr("RPMdrake")+" *";
- width: slideshow.width * .35
- wrapMode: Text.WordWrap
- color: "black"
- }
- }
+ //: Translate only if the link is to a specific page for your language
+ onMbuttonClicked: { link.weblink(qsTr("https://wiki.mageia.org/en/List_of_applications"))}
+ buttonText: qsTr("List of applications (wiki)")
}
}
Label {
- anchors {bottom: parent.bottom; }
- anchors.bottomMargin: 10
- x:20
+ anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 }
text: qsTr("(*) Administrator password is needed")
wrapMode: Text.WordWrap
font.italic: true
@@ -475,10 +475,15 @@ Rectangle {
{
var entry = appList.get(i);
var pattern = new RegExp(group, "g");
- if(pattern.test(entry.group) ) {
+ if(pattern.test(entry.group) && !pyinstallable.other(entry.name, entry.repo)) {
appListDM.items.insert(entry, "group");
}
}
+ for(var child in applicationsListView.contentItem.children) {
+ if (applicationsListView.contentItem.children[child].naturalwidth > softListRect.installwidth ) {
+ softListRect.installwidth = applicationsListView.contentItem.children[child].naturalwidth
+ }
+ }
appListDM.filterOnGroup = "items";
}
@@ -490,7 +495,7 @@ Rectangle {
Column {
Rectangle {
- // Bandeau avertissement
+ // warning banner
id: warning
width: view.width
height: warnText.height
@@ -500,23 +505,27 @@ Rectangle {
width: view.width
horizontalAlignment: TextInput.AlignHCenter
font.pixelSize: Qt.application.font.pixelSize * .9
- text: qsTr("Here is a small selection of popular applications - any of which may be installed or launched at this point.")+"<BR />"+"Ensure that you have enabled the <i>Media sources</i>."
+ text: qsTr("Here is a small selection of popular applications - any of which may be installed or launched at this point.")+"<BR />"+qsTr("Ensure that you have enabled the <i>Media sources</i>.")
textFormat: Text.RichText
wrapMode: Text.WordWrap
+ color: "black"
+ font.weight: Font.DemiBold
}
}
- Row {
- // Under the warning
- Column {
+ Item {
+ width: row.width
+ height: 200
+ Row {
+ id: row
+ // Under the warning
+
// Software categories
- id:categoriesColumn
- Component { //The hightlight
+ Component { //The hightlight
id: catHighlight
Rectangle {
- width: 190
+ width: categoriesList.width
height: Qt.application.font.pixelSize + 16
- anchors.horizontalCenter: parent.horizontalCenter
color: "#262F45"
y: categoriesList.currentItem.y;
}
@@ -524,7 +533,6 @@ Rectangle {
ListView {
id:categoriesList
- anchors {left: parent.left;}
width: 190
highlight: catHighlight
highlightFollowsCurrentItem: false
@@ -562,137 +570,155 @@ Rectangle {
}
}
- }
- Rectangle {
- // Software list
- height: box.height - 222
- x: 210
-
- DelegateModel {
- id: appListDM
- model: AppList {id: appList}
- groups: [
- DelegateModelGroup {
- includeByDefault: false
- name: "group"
+ Rectangle {
+ // Software list
+ id: softListRect
+ height: view.height
+ width: view.width - categoriesList.width
+ color: "transparent"
+ // the width of install and Launch button will be calculated then updated. We give here a minimal size
+ property real installwidth: Qt.application.font.pixelSize * 2
+
+ DelegateModel {
+ id: appListDM
+ model: AppList {id: appList}
+ groups: [
+ DelegateModelGroup {
+ includeByDefault: false
+ name: "group"
+ }
+ ]
+ filterOnGroup: "group"
+ Component.onCompleted: {
+ var rowCount = appList.count;
+ items.remove(0,rowCount);
+ for( var i = 0;i < rowCount;i++ )
+ {
+ var entry = appList.get(i);
+ var pattern = /featured/g;
+ if(pattern.test(entry.group) && !pyinstallable.other(entry.name, entry.repo) ) {
+ items.insert(entry, "group");
}
- ]
- filterOnGroup: "group"
- Component.onCompleted: {
- var rowCount = appList.count;
- items.remove(0,rowCount);
- for( var i = 0;i < rowCount;i++ )
- {
- var entry = appList.get(i);
- var pattern = /featured/g;
- if(pattern.test(entry.group) ) {
- items.insert(entry, "group");
- }
- }
- }
- delegate: Row {
- spacing: 10
- Image {
- source: icon
- width: 32
- height: 32
- }
- //CheckBox{ enabled: installable
- //}
- Column{
- Label {
- text: title
- font.weight: Font.DemiBold
- color: "white"
}
- Label {
- text: description
- font.italic: true
- font.pixelSize: Qt.application.font.pixelSize * .9
- width: view.width - (200 + 44 +38 + Qt.application.font.pixelSize * 4 * 2)
- wrapMode: Text.WordWrap
- color: "white"
+ // The lsit has to be painted first for buttons width evaluation
+ applicationsListView.forceLayout()
+ for(var child in applicationsListView.contentItem.children) {
+ if (applicationsListView.contentItem.children[child].naturalwidth > softListRect.installwidth ) {
+ softListRect.installwidth = applicationsListView.contentItem.children[child].naturalwidth
+ }
}
+ console.log("Screen: ", Screen.devicePixelRatio, Screen.pixelDensity)
+ }
+ delegate: Row {
+ spacing: 10
+ property int naturalwidth : optButton.item.implicitWidth
+ Image {
+ source: icon
+ width: 32
+ height: 32
}
+ //CheckBox{ enabled: installable
+ //}
+ Column{
+ Label {
+ text: title
+ font.weight: Font.DemiBold
+ color: "white"
+ }
+ Label {
+ text: description
+ font.italic: true
+ font.pixelSize: Qt.application.font.pixelSize * .9
+ width: view.width - (190 + 44 +38 + softListRect.installwidth + tag.width )
+ wrapMode: Text.WordWrap
+ color: "white"
+ }
+ }
- Loader {
- Component { id: button;
- Button {
- width: Qt.application.font.pixelSize * 4; height: Qt.application.font.pixelSize * 1.3
- objectName: "launch"
- onClicked: {
- launch.command(["gurpmi",name,])}
- style: ButtonStyle {
- label: Label {
- horizontalAlignment: TextInput.AlignHCenter
- verticalAlignment: TextInput.AlignVCenter
- text: qsTr("Install");
- font.pixelSize: Qt.application.font.pixelSize * .8
- color: "black"
+ Loader {
+ id: optButton
+ Component { id: button;
+ Button {
+ width: softListRect.installwidth;
+ height: Qt.application.font.pixelSize * 1.3
+ objectName: "launch"
+ onClicked: {
+ launch.command(["gurpmi",name,])}
+ style: ButtonStyle {
+ label: Label {
+ horizontalAlignment: TextInput.AlignHCenter
+ verticalAlignment: TextInput.AlignVCenter
+ text: qsTr("Install");
+ font.pixelSize: Qt.application.font.pixelSize * .8
+ color: "black"
+ }
}
}
}
-
- }
- Component { id: launcher;
- Button {
- width: Qt.application.font.pixelSize * 4; height: Qt.application.font.pixelSize * 1.3
- objectName: "launch"
- onClicked: {
- launch.command([command,])}
- style: ButtonStyle {
- label: Label {
- horizontalAlignment: TextInput.AlignHCenter
- verticalAlignment: TextInput.AlignVCenter
- text: qsTr("Launch");
- font.pixelSize: Qt.application.font.pixelSize * .8
- color: "black"
+ Component { id: launcher;
+ Button {
+ width: softListRect.installwidth;
+ height: Qt.application.font.pixelSize * 1.3
+ objectName: "launch"
+ onClicked: {
+ launch.command([command,])}
+ style: ButtonStyle {
+ label: Label {
+ horizontalAlignment: TextInput.AlignHCenter
+ verticalAlignment: TextInput.AlignVCenter
+ text: qsTr("Launch");
+ font.pixelSize: Qt.application.font.pixelSize * .8
+ color: "black"
+ }
}
}
}
- }
- Component { id: dummy;Label {text: qsTr("Installed")
- padding: 2
- horizontalAlignment: TextInput.AlignHCenter
- font.pixelSize: Qt.application.font.pixelSize * .8
- width: Qt.application.font.pixelSize * 4
- color: "white"
+ Component { id: dummy;Label {text: qsTr("Installed")
+ padding: 2
+ horizontalAlignment: TextInput.AlignHCenter
+ font.pixelSize: Qt.application.font.pixelSize * .8
+ width: softListRect.installwidth
+ color: "white"
+ }
}
+ sourceComponent: ( pyinstallable.installable(name, repo)) ? button : (command === "" ? dummy : launcher)
}
- sourceComponent: ( pyinstallable.installable(name, repo)) ? button : (command === "" ? dummy : launcher)
- }
- Loader {
- Component {
- id: repotag
- Rectangle {
- color: "#FF4C4C"
- radius: 3
- width: Qt.application.font.pixelSize * 3.2; height: Qt.application.font.pixelSize * 1.3
- Label {
- anchors.centerIn: parent
- text: repo
- font.pixelSize: Qt.application.font.pixelSize * .8
- color: "white"
+ Loader {
+ id: tag
+ Component {
+ id: repotag
+ Rectangle {
+ color: "#FF4C4C"
+ radius: 3
+ width: Qt.application.font.pixelSize * 3.5; height: Qt.application.font.pixelSize * 1.3
+ Label {
+ anchors.centerIn: parent
+ text: repo
+ font.pixelSize: Qt.application.font.pixelSize * .8
+ color: "white"
+ }
}
}
+ Component { id: dumm;
+ Label {
+ width: Qt.application.font.pixelSize * 3.5;
+ text: " "}}
+ sourceComponent: repo == "" ? dumm : repotag
}
- Component { id: dumm; Label {text: " "}}
- sourceComponent: repo == "" ? dumm : repotag
}
+ }
+ Rectangle {
+ height: view.height-warning.height
+ width: view.width-200
+ color: "transparent"
+ ListView {
+ id: applicationsListView
+ anchors.fill: parent
+ clip: true
+ model: appListDM
+ spacing: 5
}
-
- }
- Rectangle {
- height: view.height-warning.height
- width: view.width-200
- color: "transparent"
- ListView {
- id: applicationsListView
- anchors.fill: parent
- clip: true
- model: appListDM
- spacing: 5
}
}
}
@@ -701,19 +727,44 @@ Rectangle {
}
// Configuration summary Page
Rectangle {
+ Version {id:version}
property var title: qsTr("Your configuration")
width: view.width; height: view.height
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
- ListView {
- id: confList
- anchors.fill: parent
- anchors.margins: 50
- model: ConfList
- delegate: Label {
- text: name
- textFormat: Text.RichText
- color: "white"
+
+ Column {
+ Rectangle{
+ height: 50
+ width:1
+ color:"transparent"
+ }
+ ListView {
+ id: confList
+ width: view.width
+ height: view.height -150
+ model: ConfList
+ delegate: Label {
+ text: name
+ leftPadding: 50
+ textFormat: Text.RichText
+ color: "white"
+ }
+ }
+ MButton {
+ anchors.horizontalCenter: parent.horizontalCenter
+ objectName: "launch"
+ onMbuttonClicked: { about.open() }
+ buttonText: qsTr("About")
+ }
+ MessageDialog {
+ id: about
+ title: qsTr("About Mageiawelcome")
+ //: %1 will be replaced with the release number, %2 with author's names
+ text: qsTr("Release %1<br />Authors : %2").arg(version.version).arg("Daniel Napora, Papoteur, Antony Baker<br />")
+ //: replace with the list of translator's names
+ detailedText: qsTr("Translators: English is the source language")
+ standardButtons: StandardButton.Close
}
}
}
@@ -754,18 +805,30 @@ Rectangle {
color: "white"
}
Repeater{
- model: [{'name': qsTr("Release notes"), 'url': qsTr("https://wiki.mageia.org/en/Mageia_6_Release_Notes")},
- {'name': qsTr("Forums"),'url': qsTr("https://forums.mageia.org/en/")},
- {'name': qsTr("Community Center"),'url': qsTr("https://www.mageia.org/community/")},
- {'name': qsTr("Errata"), 'url': qsTr("https://wiki.mageia.org/en/Mageia_6_Errata")},
- {'name': qsTr("Wiki"), 'url': qsTr("https://wiki.mageia.org/en/Documentation")},
- {'name': qsTr("Contribute"),'url': qsTr("https://www.mageia.org/contribute/")},
- {'name': qsTr("Newcomers Howto"),'url': qsTr("https://wiki.mageia.org/en/Newcomers_start_here")},
- {'name': qsTr("Chat Room"),'url': qsTr("irc://irc.freenode.net/#mageia")},
- {'name': qsTr("Donations"),'url': qsTr("https://www.mageia.org/donate/")},
+ model: [{'name': qsTr("Release notes"), 'url':
+ //: Translate only if the link is to a specific page for your language
+ qsTr("https://wiki.mageia.org/en/Mageia_6_Release_Notes")},
+ {'name': qsTr("Forums"),'url':
+ //: Translate only if the link is to a specific page for your language
+ qsTr("https://forums.mageia.org/en/")},
+ {'name': qsTr("Community Center"),'url': "https://www.mageia.org/community/"},
+ {'name': qsTr("Errata"), 'url':
+ //: Translate only if the link is to a specific page for your language
+ qsTr("https://wiki.mageia.org/en/Mageia_6_Errata")},
+ {'name': qsTr("Wiki"), 'url':
+ //: Translate only if the link is to a specific page for your language
+ qsTr("https://wiki.mageia.org/en/Documentation")},
+ {'name': qsTr("Contribute"),'url': "https://www.mageia.org/contribute/"},
+ {'name': qsTr("Newcomers Howto"),'url':
+ //: Translate only if the link is to a specific page for your language
+ qsTr("https://wiki.mageia.org/en/Newcomers_start_here")},
+ {'name': qsTr("Chat Room"),
+ //: Translate only if the link is to a specific page for your language
+ 'url': qsTr("irc://irc.freenode.net/#mageia")},
+ {'name': qsTr("Donations"),'url': "https://www.mageia.org/donate/"},
{'name': qsTr("Documentation"),'url': "https://www.mageia.org/doc/"},
- {'name': qsTr("Bugs tracker"),'url': qsTr("https://bugs.mageia.org/")},
- {'name': qsTr("Join us!"),'url': qsTr("https://identity.mageia.org/")}]
+ {'name': qsTr("Bugs tracker"),'url': "https://bugs.mageia.org/"},
+ {'name': qsTr("Join us!"),'url': "https://identity.mageia.org/"}]
delegate: Button {
width: view.width * .2
objectName: "link"
@@ -777,6 +840,10 @@ Rectangle {
color: "black"
width: parent.width
wrapMode: Text.WordWrap }
+ background: Rectangle {
+ color: "lightgrey"
+ radius: 5
+ }
}
}
}
@@ -791,7 +858,7 @@ Rectangle {
anchors.rightMargin: 0
anchors.leftMargin: 0
anchors.topMargin: 0
- anchors { fill: parent; bottomMargin: 30 }
+ anchors { fill: parent; bottomMargin: startCB.implicitHeight +10 }
model: itemModel
preferredHighlightBegin: 0; preferredHighlightEnd: 0
highlightRangeMode: ListView.StrictlyEnforceRange
@@ -804,36 +871,42 @@ Rectangle {
}
Rectangle {
id: buttonbox
- width: banner.width; height: 46
+ width: banner.width; height: buttonRow.height
anchors { top: banner.bottom; }
color: "#262F45"
+ RowLayout {
+ id: buttonRow
- Row {
- anchors.centerIn: parent
- spacing: 10
+ Rectangle {
+ Layout.preferredWidth: 8
+ Layout.preferredHeight: buttonbox.height
+ color: buttonbox.color
+ }
Repeater {
model: itemModel.count
- Rectangle {
- width: banner.width/9; height: 35
- radius: 5
- color: view.currentIndex == index ? "#2397D4" : "white"
- Label{
- anchors.verticalCenter: parent.verticalCenter
- text: itemModel.get(index).title
- font.pointSize: 8
- width: parent.width
- color: view.currentIndex == index ? "white" : "#262F45"
- horizontalAlignment: Text.AlignHCenter
- wrapMode : Text.WordWrap
- }
+ Button {
+ Layout.fillHeight: true
- MouseArea {
- width: banner.width/8; height: 35
- anchors.centerIn: parent
- onClicked: view.currentIndex = index
+ Layout.preferredWidth: (buttonbox.width - 8)/8-9;
+ Layout.topMargin: 6
+ Layout.bottomMargin: 6
+ style: ButtonStyle {
+ background: Rectangle {
+ radius: 5
+ color: view.currentIndex == index ? "#2397D4" : "white"
+ }
+ label: Label{
+ text: itemModel.get(index).title
+ font.pointSize: 9
+ color: view.currentIndex == index ? "white" : "#262F45"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ wrapMode : Text.WordWrap
+ }
}
+ onClicked: view.currentIndex = index
}
}
}
@@ -843,6 +916,7 @@ Rectangle {
anchors.bottom: box.bottom
anchors.margins: 6
CheckBox {
+ id:startCB
text: qsTr("Show this window at startup")
checked: startupcheck
onClicked: norun.setRunAtLaunch(checked)
@@ -852,6 +926,7 @@ Rectangle {
target: launch
onInstalled: {
// get the signal to reload the applist
+ console.log("Reload applications list")
itemModel.update_list(categoriesList.currentItem.myGroup)
}
}