From 505fc9f15c618bd6a0861d0207040358828c2067 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Thu, 3 Jan 2019 08:52:53 +0100 Subject: Add a string to translate --- qml/mw-ui.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index c4f3444..7957e06 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -500,7 +500,7 @@ 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.")+"
"+"Ensure that you have enabled the Media sources." + text: qsTr("Here is a small selection of popular applications - any of which may be installed or launched at this point.")+"
"+qsTr("Ensure that you have enabled the Media sources.") textFormat: Text.RichText wrapMode: Text.WordWrap } -- cgit v1.2.1 From 0017e26b39cdb54f1844729e2823165eebde3129 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Fri, 4 Jan 2019 21:19:11 +0100 Subject: Some links not translatable, language managed by site or no translated --- qml/mw-ui.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 7957e06..74fa7ba 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -756,16 +756,16 @@ Rectangle { Repeater{ model: [{'name': qsTr("Release notes"), 'url': qsTr("https://wiki.mageia.org/en/Mageia_7_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("Community Center"),'url': "https://www.mageia.org/community/"}, {'name': qsTr("Errata"), 'url': qsTr("https://wiki.mageia.org/en/Mageia_7_Errata")}, {'name': qsTr("Wiki"), 'url': qsTr("https://wiki.mageia.org/en/Documentation")}, - {'name': qsTr("Contribute"),'url': qsTr("https://www.mageia.org/contribute/")}, + {'name': qsTr("Contribute"),'url': "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/")}, + {'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" -- cgit v1.2.1 From 930a3499a2e80787498796569f40a36877c46dd5 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Fri, 4 Jan 2019 22:41:31 +0100 Subject: Add comments for translation, clean bad links in po files --- qml/mw-ui.qml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 74fa7ba..e51f318 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -423,6 +423,7 @@ Rectangle { id: listApplicationsWiki x: 10 objectName: "link" + //: Translate only if the link is to a specific page for your language onClicked: { link.weblink(qsTr("https://wiki.mageia.org/en/List_of_applications"))} style: ButtonStyle { label: Label { @@ -754,14 +755,26 @@ Rectangle { color: "white" } Repeater{ - model: [{'name': qsTr("Release notes"), 'url': qsTr("https://wiki.mageia.org/en/Mageia_7_Release_Notes")}, - {'name': qsTr("Forums"),'url': qsTr("https://forums.mageia.org/en/")}, + 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_7_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': qsTr("https://wiki.mageia.org/en/Mageia_7_Errata")}, - {'name': qsTr("Wiki"), 'url': qsTr("https://wiki.mageia.org/en/Documentation")}, + {'name': qsTr("Errata"), 'url': + //: Translate only if the link is to a specific page for your language + qsTr("https://wiki.mageia.org/en/Mageia_7_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': qsTr("https://wiki.mageia.org/en/Newcomers_start_here")}, - {'name': qsTr("Chat Room"),'url': qsTr("irc://irc.freenode.net/#mageia")}, + {'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': "https://bugs.mageia.org/"}, -- cgit v1.2.1 From b63a8f85970347aeac4902205cca2bd3278fb161 Mon Sep 17 00:00:00 2001 From: Antony Baker Date: Fri, 4 Jan 2019 10:09:14 +0000 Subject: Media Sources: 1) add gradient to Backports. 2) change bg colour for Backports & Notes (text legibility). 3) make white text bold, to further help legibility of white text. --- qml/mw-ui.qml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index e51f318..fa28eba 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -120,7 +120,7 @@ Rectangle { Layout.fillWidth: true Label { anchors.centerIn: parent - text: qsTr("core"); } + text: qsTr("core"); font.bold: true; } } Label { text: qsTr("- the free-open-source packages"); @@ -144,7 +144,7 @@ Rectangle { Layout.fillWidth: true Label { anchors.centerIn: parent - text: qsTr("nonfree"); + text: qsTr("nonfree"); font.bold: true; color: "white"} } Label { @@ -169,7 +169,7 @@ Rectangle { Layout.fillWidth: true Label { anchors.centerIn: parent - text: qsTr("tainted"); + text: qsTr("tainted"); font.bold: true; color: "white" } } Label { @@ -178,13 +178,21 @@ Rectangle { Layout.maximumWidth: slideshow.width * .8 color: "white" } - Rectangle { - color: "lightgrey" + Rectangle {id: backports + 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" } + } + } width: 80; height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true Label { anchors.centerIn: parent - text: qsTr("backports"); } + text: qsTr("backports"); font.bold: true; } } Label { text: qsTr("- includes software published after a Mageia release, or another version of software already present and not replaced."); @@ -208,13 +216,13 @@ Rectangle { } } Rectangle {id: noteBg - color: "gold"; + color: "#e6c200"; width: 70 height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true Label { anchors.centerIn: parent - text: qsTr("Note! ") + text: qsTr("Note! "); font.bold: true; } } 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. -- cgit v1.2.1 From 9b3bbae2301c5700a9cc0dfd0ed1d0ad0302627e Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 5 Jan 2019 18:59:41 +0100 Subject: Applications: Specify color of warn text. --- qml/mw-ui.qml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index fa28eba..2153e70 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -512,6 +512,8 @@ Rectangle { text: qsTr("Here is a small selection of popular applications - any of which may be installed or launched at this point.")+"
"+qsTr("Ensure that you have enabled the Media sources.") textFormat: Text.RichText wrapMode: Text.WordWrap + color: "black" + font.bold: true } } Row { -- cgit v1.2.1 From 5ebf0606a958808f052a3f826e77f3e17161367d Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 5 Jan 2019 19:23:55 +0100 Subject: Install sources: give more space to text --- qml/mw-ui.qml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 2153e70..c29fadb 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -97,7 +97,7 @@ Rectangle { Column { anchors.left: parent.left anchors.leftMargin: 20 - y: 35 + y: 10 Label { text: qsTr("Configure software repositories"); font.bold: true; color: "white" } Label { text: qsTr("Mageia official repositories contain:"); @@ -125,7 +125,7 @@ Rectangle { Label { text: qsTr("- the free-open-source packages"); wrapMode: Text.WordWrap - Layout.maximumWidth: slideshow.width * .6 + Layout.maximumWidth: slideshow.width -110 color: "white" } @@ -150,7 +150,7 @@ Rectangle { 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" } @@ -175,7 +175,7 @@ Rectangle { 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 {id: backports @@ -197,11 +197,11 @@ Rectangle { Label { 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 + Layout.maximumWidth: slideshow.width -110 color: "white" } Button { - Layout.maximumWidth: slideshow.width * .25 + Layout.maximumWidth: slideshow.width * .40 Layout.columnSpan: 2 Layout.alignment: Qt.AlignHCenter objectName: "launch" @@ -233,7 +233,7 @@ Rectangle { textFormat: Text.RichText color: "white" Layout.fillWidth: true - Layout.maximumWidth: slideshow.width * .85 + Layout.maximumWidth: slideshow.width - 110 } } -- cgit v1.2.1 From 6e177c1db8f2f62578c512171e3f919342c45997 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 5 Jan 2019 19:26:48 +0100 Subject: Applications: give more space to buttons texts --- qml/mw-ui.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index c29fadb..cebd7aa 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -629,7 +629,7 @@ Rectangle { Loader { Component { id: button; Button { - width: Qt.application.font.pixelSize * 4; height: Qt.application.font.pixelSize * 1.3 + width: Qt.application.font.pixelSize * 5; height: Qt.application.font.pixelSize * 1.3 objectName: "launch" onClicked: { launch.command(["gurpmi",name,])} @@ -647,7 +647,7 @@ Rectangle { } Component { id: launcher; Button { - width: Qt.application.font.pixelSize * 4; height: Qt.application.font.pixelSize * 1.3 + width: Qt.application.font.pixelSize * 5; height: Qt.application.font.pixelSize * 1.3 objectName: "launch" onClicked: { launch.command([command,])} @@ -666,7 +666,7 @@ Rectangle { padding: 2 horizontalAlignment: TextInput.AlignHCenter font.pixelSize: Qt.application.font.pixelSize * .8 - width: Qt.application.font.pixelSize * 4 + width: Qt.application.font.pixelSize * 5 color: "white" } } -- cgit v1.2.1 From 1ba9d8a7ae188d71406bed725408d101f37ad7b2 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Thu, 10 Jan 2019 10:03:51 +0100 Subject: Applications: don't display core application when tainted one is installed --- qml/mw-ui.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index cebd7aa..3cc1223 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -484,7 +484,7 @@ 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"); } } @@ -596,7 +596,7 @@ Rectangle { { var entry = appList.get(i); var pattern = /featured/g; - if(pattern.test(entry.group) ) { + if(pattern.test(entry.group) && !pyinstallable.other(entry.name, entry.repo) ) { items.insert(entry, "group"); } } -- cgit v1.2.1 From 7b5125c0d179269dbfa942669a048f6ba26f7174 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sun, 13 Jan 2019 21:57:34 +0100 Subject: Applications: manage adjustment of width to the larger button Enlarge column of repo name in media sources --- qml/mw-ui.qml | 54 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 14 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 3cc1223..36c6a01 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -11,6 +11,10 @@ Rectangle { width: 1000; height: 650 property alias view: view + // For RTL tests + //LayoutMirroring.enabled: true + //LayoutMirroring.childrenInherit: true + Component { id: slidebackground LinearGradient { @@ -114,7 +118,7 @@ Rectangle { GradientStop { position: 1.0; color: "green" } } } - width: 80; + width: 90; height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true @@ -139,7 +143,7 @@ Rectangle { GradientStop { position: 1.0; color: "darkred" } } } - width: 80; height: 30 + height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true Label { @@ -164,7 +168,7 @@ Rectangle { GradientStop { position: 1.0; color: "darkred" } } } - width: 80; height: 30 + height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true Label { @@ -188,7 +192,7 @@ Rectangle { GradientStop { position: 1.0; color: "darkgray" } } } - width: 80; height: 30 + height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true Label { anchors.centerIn: parent @@ -217,7 +221,6 @@ Rectangle { } Rectangle {id: noteBg color: "#e6c200"; - width: 70 height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true @@ -488,6 +491,12 @@ Rectangle { 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 + } + //console.log(applicationsListView.contentItem.children[child].naturalwidth.implicitWidth, typeof(applicationsListView.contentItem.children[child].naturalwidth)) + } appListDM.filterOnGroup = "items"; } @@ -527,7 +536,7 @@ Rectangle { Rectangle { width: 190 height: Qt.application.font.pixelSize + 16 - anchors.horizontalCenter: parent.horizontalCenter + //anchors.horizontalCenter: parent.horizontalCenter color: "#262F45" y: categoriesList.currentItem.y; } @@ -578,6 +587,9 @@ Rectangle { // Software list height: box.height - 222 x: 210 + id: softListRect + // 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 @@ -600,9 +612,17 @@ Rectangle { items.insert(entry, "group"); } } + // 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 + } + } } delegate: Row { spacing: 10 + property int naturalwidth : optButton.item.implicitWidth Image { source: icon width: 32 @@ -620,23 +640,25 @@ Rectangle { text: description font.italic: true font.pixelSize: Qt.application.font.pixelSize * .9 - width: view.width - (200 + 44 +38 + Qt.application.font.pixelSize * 4 * 2) + width: view.width - (200 + 44 +38 + softListRect.installwidth + Qt.application.font.pixelSize * 3.5) wrapMode: Text.WordWrap color: "white" } } Loader { + id: optButton Component { id: button; Button { - width: Qt.application.font.pixelSize * 5; height: Qt.application.font.pixelSize * 1.3 + 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 + verticalAlignment: TextInput.AlignVCenter text: qsTr("Install"); font.pixelSize: Qt.application.font.pixelSize * .8 color: "black" @@ -647,14 +669,15 @@ Rectangle { } Component { id: launcher; Button { - width: Qt.application.font.pixelSize * 5; height: Qt.application.font.pixelSize * 1.3 + 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 + verticalAlignment: TextInput.AlignVCenter text: qsTr("Launch"); font.pixelSize: Qt.application.font.pixelSize * .8 color: "black" @@ -666,7 +689,7 @@ Rectangle { padding: 2 horizontalAlignment: TextInput.AlignHCenter font.pixelSize: Qt.application.font.pixelSize * .8 - width: Qt.application.font.pixelSize * 5 + width: softListRect.installwidth color: "white" } } @@ -679,7 +702,7 @@ Rectangle { Rectangle { color: "#FF4C4C" radius: 3 - width: Qt.application.font.pixelSize * 3.2; height: Qt.application.font.pixelSize * 1.3 + width: Qt.application.font.pixelSize * 3.5; height: Qt.application.font.pixelSize * 1.3 Label { anchors.centerIn: parent text: repo @@ -688,7 +711,10 @@ Rectangle { } } } - Component { id: dumm; Label {text: " "}} + Component { id: dumm; + Label { + width: Qt.application.font.pixelSize * 3.5; + text: " "}} sourceComponent: repo == "" ? dumm : repotag } } -- cgit v1.2.1 From 9d08b50c8551501a0c7dcf28817d77f8fd662b34 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Fri, 18 Jan 2019 09:48:30 +0100 Subject: Media sources: rework layout Place remark about password in bottom band --- qml/mw-ui.qml | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 36c6a01..834708c 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -8,7 +8,7 @@ import QtGraphicalEffects 1 Rectangle { id: box - width: 1000; height: 650 + width: 1000; height: 700 property alias view: view // For RTL tests @@ -98,17 +98,23 @@ Rectangle { Loader { sourceComponent: slidebackground ; anchors.fill: parent} - Column { - anchors.left: parent.left - anchors.leftMargin: 20 - y: 10 - Label { text: qsTr("Configure software repositories"); font.bold: true; - color: "white" } - Label { text: qsTr("Mageia official repositories contain:"); - color: "white" } - GridLayout { - columns: 2 + //Column { + //anchors.left: parent.left + // y: 10 + GridLayout { + columns: 2 + Label { + Layout.columnSpan: 2 + Layout.margins: 10 + text: qsTr("Configure software repositories"); font.bold: true; + color: "white" } + Label { + Layout.columnSpan: 2 + Layout.margins: 10 + text: qsTr("Mageia official repositories contain:"); + color: "white" } Rectangle {id: coreBg + Layout.margins: 5 LinearGradient { anchors.fill: parent start: Qt.point(0, 0) @@ -124,16 +130,18 @@ Rectangle { Layout.fillWidth: true Label { anchors.centerIn: parent + //: Should be as displayed in software manager, thus in general not translated text: qsTr("core"); font.bold: true; } } Label { text: qsTr("- the free-open-source packages"); wrapMode: Text.WordWrap - Layout.maximumWidth: slideshow.width -110 + Layout.maximumWidth: slideshow.width -20 - coreBg.width color: "white" } Rectangle {id: nonfreeBg + Layout.margins: 5 LinearGradient { anchors.fill: parent start: Qt.point(0, 0) @@ -148,6 +156,7 @@ Rectangle { Layout.fillWidth: true Label { anchors.centerIn: parent + //: Should be as displayed in software manager, thus in general not translated text: qsTr("nonfree"); font.bold: true; color: "white"} } @@ -159,6 +168,7 @@ Rectangle { color: "white" } Rectangle {id: taintedBg + Layout.margins: 5 LinearGradient { anchors.fill: parent start: Qt.point(0, 0) @@ -173,6 +183,7 @@ Rectangle { Layout.fillWidth: true Label { anchors.centerIn: parent + //: Should be as displayed in software manager, thus in general not translated text: qsTr("tainted"); font.bold: true; color: "white" } } @@ -183,6 +194,7 @@ Rectangle { color: "white" } Rectangle {id: backports + Layout.margins: 5 LinearGradient { anchors.fill: parent start: Qt.point(0, 0) @@ -196,6 +208,7 @@ Rectangle { Layout.alignment: Qt.AlignTop Layout.fillWidth: true Label { anchors.centerIn: parent + //: Should be as displayed in software manager, thus in general not translated text: qsTr("backports"); font.bold: true; } } Label { @@ -220,6 +233,7 @@ Rectangle { } } Rectangle {id: noteBg + Layout.margins: 5 color: "#e6c200"; height: 30 Layout.alignment: Qt.AlignTop @@ -242,13 +256,14 @@ Rectangle { Label { x: 84 + anchors {top: parent.bottom; topMargin: 3; } text: qsTr("(*) Administrator password is needed.") Layout.maximumWidth: slideshow.width * .25 wrapMode: Text.WordWrap font.italic: true color: "white" } - } + } // Update page Rectangle { @@ -303,8 +318,7 @@ Rectangle { } Label { - anchors {bottom: parent.bottom; } - anchors.bottomMargin: 10 + anchors {top: parent.bottom; topMargin: 3 } x:20 text: qsTr("(*) User password is needed") wrapMode: Text.WordWrap @@ -379,8 +393,7 @@ Rectangle { } } Label { - anchors {bottom: parent.bottom; } - anchors.bottomMargin: 10 + anchors {top: parent.bottom; topMargin: 3; } x:20 text: qsTr("(*) Administrator password is needed") wrapMode: Text.WordWrap @@ -470,8 +483,7 @@ Rectangle { } } Label { - anchors {bottom: parent.bottom; } - anchors.bottomMargin: 10 + anchors {top: parent.bottom; topMargin: 3} x:20 text: qsTr("(*) Administrator password is needed") wrapMode: Text.WordWrap -- cgit v1.2.1 From 06dc0404c017077dff611e034e566e2ed8f81ef6 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Fri, 18 Jan 2019 11:23:44 +0100 Subject: Media sources: automatic width of first column --- qml/mw-ui.qml | 166 ++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 97 insertions(+), 69 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 834708c..69e122f 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -113,25 +113,31 @@ Rectangle { Layout.margins: 10 text: qsTr("Mageia official repositories contain:"); color: "white" } - Rectangle {id: coreBg + Button {id: coreBg Layout.margins: 5 - 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: 90; - height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { - anchors.centerIn: parent - //: Should be as displayed in software manager, thus in general not translated - text: qsTr("core"); font.bold: true; } + //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"); @@ -139,27 +145,31 @@ Rectangle { Layout.maximumWidth: slideshow.width -20 - coreBg.width color: "white" } - - Rectangle {id: nonfreeBg + Button { Layout.margins: 5 - 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" } - } - } - height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { - anchors.centerIn: parent - //: Should be as displayed in software manager, thus in general not translated - text: qsTr("nonfree"); font.bold: true; - 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"); @@ -167,50 +177,62 @@ Rectangle { wrapMode: Text.WordWrap color: "white" } - Rectangle {id: taintedBg + Button { Layout.margins: 5 - 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" } - } - } - height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { - anchors.centerIn: parent - //: Should be as displayed in software manager, thus in general not translated - text: qsTr("tainted"); font.bold: true; - 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 -110 color: "white" } - Rectangle {id: backports + Button { Layout.margins: 5 - 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" } - } - } - height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { anchors.centerIn: parent - //: Should be as displayed in software manager, thus in general not translated - text: qsTr("backports"); font.bold: true; } + 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."); wrapMode: Text.WordWrap @@ -232,16 +254,22 @@ Rectangle { } } } - Rectangle {id: noteBg + Button { Layout.margins: 5 - color: "#e6c200"; - height: 30 Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Label { anchors.centerIn: parent - text: qsTr("Note! "); font.bold: true; + style: ButtonStyle { + label: Label { + horizontalAlignment: TextInput.AlignHCenter + text: qsTr("Note! "); + font.bold: true; color: "black"; + } + background: Rectangle { + color: "#e6c200"; + } + } - } + } 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 cdrom entry from the list of repositories.")+"

"+ qsTr("Now, please enable or disable the online repositories of your choice: click on the Edit software repositories button. Select at least the release and updates pair. Debug and Testing are for special cases.")+"
"+ -- cgit v1.2.1 From fdd64d949f0dfc5447ab7ba03de41ceeb7829fe6 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Fri, 18 Jan 2019 12:59:44 +0100 Subject: Button box: rendering its height adaptable to texts in buttons Place (*) adaptable to RTL --- qml/mw-ui.qml | 67 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 33 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 69e122f..b379ba2 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -105,12 +105,14 @@ Rectangle { columns: 2 Label { Layout.columnSpan: 2 - Layout.margins: 10 + Layout.topMargin: 10 + Layout.leftMargin: 10 text: qsTr("Configure software repositories"); font.bold: true; color: "white" } Label { Layout.columnSpan: 2 - Layout.margins: 10 + Layout.topMargin: 10 + Layout.leftMargin: 10 text: qsTr("Mageia official repositories contain:"); color: "white" } Button {id: coreBg @@ -283,11 +285,9 @@ Rectangle { } Label { - x: 84 - anchors {top: parent.bottom; topMargin: 3; } + 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" } @@ -346,8 +346,7 @@ Rectangle { } Label { - anchors {top: parent.bottom; topMargin: 3 } - 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 @@ -421,8 +420,7 @@ Rectangle { } } Label { - anchors {top: parent.bottom; topMargin: 3; } - 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 @@ -511,8 +509,7 @@ Rectangle { } } Label { - anchors {top: parent.bottom; topMargin: 3} - 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 @@ -893,36 +890,40 @@ Rectangle { } Rectangle { id: buttonbox - width: banner.width; height: 46 + width: banner.width; height: buttonRow.height anchors { top: banner.bottom; } color: "#262F45" - Row { - anchors.centerIn: parent - spacing: 10 + RowLayout { + id: buttonRow 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: banner.width/8-15; + Layout.topMargin: 6 + Layout.leftMargin: 4 + Layout.rightMargin: 4 + Layout.bottomMargin: 6 + //Layout.alignment: Qt.AlignHCenter + style: ButtonStyle { + background: Rectangle { + radius: 5 + color: view.currentIndex == index ? "#2397D4" : "white" + } + label: Label{ + anchors.verticalCenter: parent.verticalCenter + text: itemModel.get(index).title + font.pointSize: 8 + color: view.currentIndex == index ? "white" : "#262F45" + horizontalAlignment: Text.AlignHCenter + wrapMode : Text.WordWrap + } } + onClicked: view.currentIndex = index } } } -- cgit v1.2.1 From 698234792e0135b029ac95659f30fb79be78eda2 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Fri, 18 Jan 2019 13:13:34 +0100 Subject: Add log for screen characteristics --- qml/mw-ui.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index b379ba2..717ade6 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -5,6 +5,7 @@ import QtQuick.Layouts 1.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtGraphicalEffects 1 +import QtQuick.Window 2 Rectangle { id: box @@ -532,7 +533,6 @@ Rectangle { if (applicationsListView.contentItem.children[child].naturalwidth > softListRect.installwidth ) { softListRect.installwidth = applicationsListView.contentItem.children[child].naturalwidth } - //console.log(applicationsListView.contentItem.children[child].naturalwidth.implicitWidth, typeof(applicationsListView.contentItem.children[child].naturalwidth)) } appListDM.filterOnGroup = "items"; } @@ -656,6 +656,7 @@ Rectangle { softListRect.installwidth = applicationsListView.contentItem.children[child].naturalwidth } } + console.log("Screen: ", Screen.devicePixelRatio, Screen.pixelDensity) } delegate: Row { spacing: 10 -- cgit v1.2.1 From 890566f42bf9a43c3fefe0e85b5a839ef63b99df Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 19 Jan 2019 22:42:28 +0100 Subject: Allow saving the size of the window --- qml/mw-ui.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 717ade6..bd327f7 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -6,16 +6,17 @@ import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtGraphicalEffects 1 import QtQuick.Window 2 +import Qt.labs.settings 1.0 Rectangle { id: box width: 1000; height: 700 property alias view: view - // For RTL tests - //LayoutMirroring.enabled: true - //LayoutMirroring.childrenInherit: true - + Settings { + property alias width: box.width + property alias height: box.height + } Component { id: slidebackground LinearGradient { -- cgit v1.2.1 From 48b8233d6e344c0d8895b984093b9c3e4af8a86e Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 19 Jan 2019 22:47:14 +0100 Subject: Add variable to select writing direction --- qml/mw-ui.qml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index bd327f7..9ebc589 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -13,6 +13,11 @@ Rectangle { width: 1000; height: 700 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) + LayoutMirroring.childrenInherit: true + Settings { property alias width: box.width property alias height: box.height -- cgit v1.2.1 From ac4ac641f979b67377b75fcc5af09012001c7126 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sun, 20 Jan 2019 09:13:38 +0100 Subject: more adaptative layout to RTL/LTR (Update and MCC) --- qml/mw-ui.qml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 9ebc589..a36cc49 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -16,6 +16,8 @@ Rectangle { //: 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 { @@ -256,7 +258,7 @@ Rectangle { onClicked: { launch.command(["drakrpm-edit-media",])} style: ButtonStyle { label: Label { - text: qsTr("Edit software repositories")+" *"; + text: qsTr("Edit software sources")+" *"; width: parent.width wrapMode: Text.WordWrap color: "black" @@ -307,21 +309,21 @@ 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 + 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; + width: view.width * .18 + anchors.horizontalCenter: parent.horizontalCenter objectName: "launch" onClicked:{ launch.command(["drakrpm-update",])} style: ButtonStyle { @@ -337,6 +339,7 @@ Rectangle { Button { x:10 width: view.width * .18; + anchors.horizontalCenter: parent.horizontalCenter objectName: "link" onClicked:{ link.weblink("https://advisories.mageia.org/")} style: ButtonStyle { @@ -381,6 +384,7 @@ Rectangle { } Label { padding: 5 + anchors.horizontalCenter: parent.horizontalCenter text: "
  • "+qsTr("Software Management")+"
  • " + qsTr("Hardware")+"
  • " + qsTr("Network and Internet")+"
  • " @@ -389,15 +393,15 @@ Rectangle { + qsTr("Local Disks")+"
  • " + qsTr("Security")+"
  • " + qsTr("Boot")+"
"; - 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; + anchors.horizontalCenter: parent.horizontalCenter objectName: "launch" onClicked: { launch.command(["drakconf"])} style: ButtonStyle { @@ -411,8 +415,8 @@ Rectangle { } } Button { - x: 10 - width: view.width * .18; + width: view.width * .18; + anchors.horizontalCenter: parent.horizontalCenter objectName: "link" onClicked: { link.weblink("https://www.mageia.org/doc")} style: ButtonStyle { -- cgit v1.2.1 From 8e9806acde529498aa63f80fea32a80c8629e59b Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sun, 20 Jan 2019 09:38:44 +0100 Subject: more adaptative layout to RTL/LTR (install software) Move Rpmdrake button Suppress reference to more information tab --- qml/mw-ui.qml | 58 ++++++++++++++++++++++++---------------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index a36cc49..5519618 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -445,12 +445,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 @@ -458,31 +456,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" } + Button { + id: rpmdrake + anchors.left: parent.left; anchors.leftMargin: 20; + objectName: "launch" + onClicked: { + launch.command(["rpmdrake",])} + style: ButtonStyle { + label: Label { + text: qsTr("RPMdrake")+" *"; + width: slideshow.width * .35 + wrapMode: Text.WordWrap + color: "black" + } + } + } Label { text: qsTr("The next slide shows a small selection of popular applications - any of which may be installed at this point.
"); - 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 + anchors.left: parent.left; anchors.leftMargin: 20 objectName: "link" //: Translate only if the link is to a specific page for your language onClicked: { link.weblink(qsTr("https://wiki.mageia.org/en/List_of_applications"))} @@ -495,29 +508,6 @@ Rectangle { } } } - Label { - text: "
"+qsTr("You can find details of how to contact the community by selecting the More information 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" - } - } - } } Label { anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 } -- cgit v1.2.1 From 203ac1652b98dda9de569d7e9d6ed9d4e60467f5 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 21 Jan 2019 08:00:05 +0100 Subject: Applications: rework for allowing mirroting with RTL language behaviour --- qml/mw-ui.qml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 5519618..787e410 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -559,21 +559,23 @@ Rectangle { textFormat: Text.RichText wrapMode: Text.WordWrap color: "black" - font.bold: true + font.weight: Font.DemiBold } } - Row { - // Under the warning - Column { - // Software categories - id:categoriesColumn + Item { + width: row.width + height: 200 + Row { + id: row + // Under the warning + + // Software categories 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; } @@ -581,7 +583,6 @@ Rectangle { ListView { id:categoriesList - anchors {left: parent.left;} width: 190 highlight: catHighlight highlightFollowsCurrentItem: false @@ -619,12 +620,13 @@ Rectangle { } } - } + Rectangle { // Software list - height: box.height - 222 - x: 210 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 @@ -678,7 +680,7 @@ Rectangle { text: description font.italic: true font.pixelSize: Qt.application.font.pixelSize * .9 - width: view.width - (200 + 44 +38 + softListRect.installwidth + Qt.application.font.pixelSize * 3.5) + width: view.width - (190 + 44 +38 + softListRect.installwidth + tag.width ) wrapMode: Text.WordWrap color: "white" } @@ -735,6 +737,7 @@ Rectangle { } Loader { + id: tag Component { id: repotag Rectangle { @@ -770,7 +773,7 @@ Rectangle { spacing: 5 } } - } + }} } } } -- cgit v1.2.1 From be6044545f1693e9093efe69686a264e20e65df0 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 21 Jan 2019 09:57:13 +0100 Subject: Formatting indentation --- qml/mw-ui.qml | 270 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 134 insertions(+), 136 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 787e410..7383b41 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -545,7 +545,7 @@ Rectangle { Column { Rectangle { - // Bandeau avertissement + // warning banner id: warning width: view.width height: warnText.height @@ -567,11 +567,11 @@ Rectangle { height: 200 Row { id: row - // Under the warning + // Under the warning - // Software categories + // Software categories - Component { //The hightlight + Component { //The hightlight id: catHighlight Rectangle { width: categoriesList.width @@ -620,160 +620,158 @@ Rectangle { } } - - 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" + 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) && !pyinstallable.other(entry.name, entry.repo) ) { - items.insert(entry, "group"); } - } - // 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 + // 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) } - 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" - } + 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 { - 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" + 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: 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: 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: softListRect.installwidth - 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 { - 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" + 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 { - width: Qt.application.font.pixelSize * 3.5; - 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 } } - }} + } } } } -- cgit v1.2.1 From f242050139d84a0d8acc0870072d5f0ceb2a5128 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 21 Jan 2019 09:59:05 +0100 Subject: More adaptative to HiDPI - window size follows scaling factor - bottom band follows checkbox size --- qml/mw-ui.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 7383b41..6ef46f0 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -10,7 +10,7 @@ import Qt.labs.settings 1.0 Rectangle { id: box - width: 1000; height: 700 + width: 1000 * Screen.devicePixelRatio; height: 700 * Screen.devicePixelRatio property alias view: view //: For Right to Left language, set this string to RTL @@ -879,7 +879,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 @@ -935,6 +935,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) -- cgit v1.2.1 From ac43b4aa95c29f078b184d68affa3aa5296b0d3f Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 21 Jan 2019 10:12:04 +0100 Subject: Change cdrom entry with Local entry --- qml/mw-ui.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 6ef46f0..9851532 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -282,7 +282,7 @@ Rectangle { } } 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 cdrom entry from the list of repositories.")+"

"+ + If this computer will have access to the Internet, you can delete the Local entry from the list of repositories.")+"

"+ qsTr("Now, please enable or disable the online repositories of your choice: click on the Edit software repositories button. Select at least the release and updates pair. Debug and Testing are for special cases.")+"
"+ qsTr("After you have checked and enabled the repositories you need, you can go to the next slide.
"); wrapMode: Text.WordWrap -- cgit v1.2.1 From 58c219ace365c508d8cd1bc6dfc1574428e8a82d Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 21 Jan 2019 13:01:21 +0100 Subject: Add About dialog with version --- qml/mw-ui.qml | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 9851532..ed75495 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -7,6 +7,7 @@ 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 @@ -777,19 +778,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" + } + } + Button { + x: (view.width - width)/2 + text: qsTr("About") + onClicked: about.open() + } + + MessageDialog { + id: about + title: qsTr("About Mageiawelcome") + //: the %1 will be replaced with the user name + text: "Release %1
Authors : Daniel Napora, Papoteur, Antony Baker
".arg(version.version) + //: replace with the list of translator's names + detailedText: qsTr("Translators: English is the source language") + standardButtons: StandardButton.Close } } } -- cgit v1.2.1 From f8a522106c79ae3d70af4498e006c28f8b5887d4 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 28 Jan 2019 09:25:55 +0100 Subject: Update: icon not availble in Gnome Software sources: move button --- qml/mw-ui.qml | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index ed75495..fb1e309 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -251,21 +251,6 @@ Rectangle { Layout.maximumWidth: slideshow.width -110 color: "white" } - Button { - Layout.maximumWidth: slideshow.width * .40 - Layout.columnSpan: 2 - Layout.alignment: Qt.AlignHCenter - objectName: "launch" - onClicked: { launch.command(["drakrpm-edit-media",])} - style: ButtonStyle { - label: Label { - text: qsTr("Edit software sources")+" *"; - width: parent.width - wrapMode: Text.WordWrap - color: "black" - } - } - } Button { Layout.margins: 5 Layout.alignment: Qt.AlignTop @@ -283,15 +268,38 @@ Rectangle { } } 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 Local entry from the list of repositories.")+"

"+ - qsTr("Now, please enable or disable the online repositories of your choice: click on the Edit software repositories button. Select at least the release and updates pair. Debug and Testing are for special cases.")+"
"+ - qsTr("After you have checked and enabled the repositories you need, you can go to the next slide.
"); + If this computer will have access to the Internet, you can delete the Local 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 Edit software repositories button. Select at least the release and updates pair. Debug and Testing are for special cases.")+"
"+ + 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 - 10 + Layout.columnSpan: 2 + Layout.margins: 10 + } + Button { + Layout.maximumWidth: slideshow.width * .40 + Layout.columnSpan: 2 + Layout.alignment: Qt.AlignHCenter + objectName: "launch" + onClicked: { launch.command(["drakrpm-edit-media",])} + style: ButtonStyle { + label: Label { + text: qsTr("Edit software sources")+" *"; + width: parent.width + wrapMode: Text.WordWrap + color: "black" + } + } + } } Label { @@ -317,7 +325,9 @@ Rectangle { Label { 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"); + 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 (not available with Gnome). 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" } -- cgit v1.2.1 From 1df424ec23ea2b260211806e017fd33dc98ecacc Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 28 Jan 2019 09:45:03 +0100 Subject: Update: delete exception of Gnome, was a bug --- qml/mw-ui.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index fb1e309..1efa327 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -326,8 +326,8 @@ Rectangle { 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 (not available with Gnome). 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"); +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" } -- cgit v1.2.1 From ef13f51356527a27e9419cb2df8d39c99242b107 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Fri, 1 Feb 2019 22:07:31 +0100 Subject: About: authors are not translatable --- qml/mw-ui.qml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 1efa327..996938c 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -814,15 +814,21 @@ This is a background process and you will be able to use your computer normally } Button { x: (view.width - width)/2 - text: qsTr("About") onClicked: about.open() + style: ButtonStyle { + label: Label { + horizontalAlignment: TextInput.AlignHCenter + text: qsTr("About") + color: "black" + } + } } MessageDialog { id: about title: qsTr("About Mageiawelcome") - //: the %1 will be replaced with the user name - text: "Release %1
Authors : Daniel Napora, Papoteur, Antony Baker
".arg(version.version) + //: %1 will be replaced with the release number, %2 with author's names + text: qsTr("Release %1
Authors : %2").arg(version.version).arg("Daniel Napora, Papoteur, Antony Baker
") //: replace with the list of translator's names detailedText: qsTr("Translators: English is the source language") standardButtons: StandardButton.Close -- cgit v1.2.1 From 708f51d4c078c5360d50c4e5995129891c3d551b Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sun, 3 Feb 2019 22:41:49 +0100 Subject: Applications: secure rpm query after installation (mga#24095) --- qml/mw-ui.qml | 1 + 1 file changed, 1 insertion(+) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 996938c..30545c8 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -987,6 +987,7 @@ This is a background process and you will be able to use your computer normally target: launch onInstalled: { // get the signal to reload the applist + console.log("Reload applications list") itemModel.update_list(categoriesList.currentItem.myGroup) } } -- cgit v1.2.1 From b7ceff2589a703b4f8e0fd524cbd2176418f6a59 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Tue, 5 Feb 2019 21:05:24 +0100 Subject: Buttons: center text vertically --- qml/mw-ui.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 30545c8..c47d94f 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -959,11 +959,12 @@ This is a background process and you will be able to use your computer normally color: view.currentIndex == index ? "#2397D4" : "white" } label: Label{ - anchors.verticalCenter: parent.verticalCenter + //anchors.verticalCenter: parent.verticalCenter text: itemModel.get(index).title - font.pointSize: 8 + font.pointSize: 9 color: view.currentIndex == index ? "white" : "#262F45" horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter wrapMode : Text.WordWrap } } -- cgit v1.2.1 From 898fac07ec5f2aba1e09bb77b873a59c5bd29d14 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 16 Feb 2019 07:40:31 +0100 Subject: Buttonbox: Better Layout (mga#24200) --- qml/mw-ui.qml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index c47d94f..785564e 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -937,29 +937,30 @@ This is a background process and you will be able to use your computer normally width: banner.width; height: buttonRow.height anchors { top: banner.bottom; } color: "#262F45" - RowLayout { id: buttonRow + Rectangle { + Layout.preferredWidth: 8 + Layout.preferredHeight: buttonbox.height + color: buttonbox.color + } + Repeater { model: itemModel.count Button { Layout.fillHeight: true - Layout.preferredWidth: banner.width/8-15; + Layout.preferredWidth: (buttonbox.width - 8)/8-9; Layout.topMargin: 6 - Layout.leftMargin: 4 - Layout.rightMargin: 4 Layout.bottomMargin: 6 - //Layout.alignment: Qt.AlignHCenter style: ButtonStyle { background: Rectangle { radius: 5 color: view.currentIndex == index ? "#2397D4" : "white" } label: Label{ - //anchors.verticalCenter: parent.verticalCenter text: itemModel.get(index).title font.pointSize: 9 color: view.currentIndex == index ? "white" : "#262F45" -- cgit v1.2.1 From 406312b33d6737ba840794510eca6d0eafbc40ab Mon Sep 17 00:00:00 2001 From: Papoteur Date: Tue, 26 Mar 2019 13:32:29 +0100 Subject: Introduce special MButton --- qml/mw-ui.qml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 785564e..8ee195e 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -285,20 +285,13 @@ Rectangle { Layout.columnSpan: 2 Layout.margins: 10 } - Button { + MButton { Layout.maximumWidth: slideshow.width * .40 Layout.columnSpan: 2 Layout.alignment: Qt.AlignHCenter objectName: "launch" - onClicked: { launch.command(["drakrpm-edit-media",])} - style: ButtonStyle { - label: Label { - text: qsTr("Edit software sources")+" *"; - width: parent.width - wrapMode: Text.WordWrap - color: "black" - } - } + onMbuttonClicked: { launch.command(["drakrpm-edit-media",])} + buttonText: qsTr("Edit software sources")+" *" } } -- cgit v1.2.1 From 068daa2d820f4344c695c37118d2f7eddd4661ce Mon Sep 17 00:00:00 2001 From: Papoteur Date: Tue, 26 Mar 2019 13:33:33 +0100 Subject: new text for backports repository explanation --- qml/mw-ui.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 8ee195e..dcefa43 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -246,7 +246,7 @@ Rectangle { } } 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 -110 color: "white" -- cgit v1.2.1 From d45b362589c6cf7209246414c856ce63159bca39 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Tue, 26 Mar 2019 13:39:21 +0100 Subject: Invert the slide background gradient. Adapt it to window size --- qml/mw-ui.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index dcefa43..0286384 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -29,10 +29,10 @@ Rectangle { 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" } } } } -- cgit v1.2.1 From 9e5c9cb1c2da20234814dc4ee195232b0a0c205e Mon Sep 17 00:00:00 2001 From: Papoteur Date: Tue, 26 Mar 2019 14:21:36 +0100 Subject: All buttons with new design --- qml/mw-ui.qml | 124 ++++++++++++++++------------------------------------------ 1 file changed, 34 insertions(+), 90 deletions(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 0286384..e97eb41 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -325,37 +325,18 @@ This is a background process and you will be able to use your computer normally color: "white" } - Button { - 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(["drakrpm-update",])} + buttonText: qsTr("Advisories of updates (en)") } } @@ -401,38 +382,18 @@ This is a background process and you will be able to use your computer normally color: "white" } - - Button { - id: mcc - width: view.width * .18; - anchors.horizontalCenter: parent.horizontalCenter + 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 { - width: view.width * .18; - anchors.horizontalCenter: parent.horizontalCenter - 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 {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 } @@ -466,20 +427,12 @@ This is a background process and you will be able to use your computer normally textFormat: Text.RichText color: "white" } - Button { - id: rpmdrake + MButton { anchors.left: parent.left; anchors.leftMargin: 20; + width: slideshow.width * .35 objectName: "launch" - onClicked: { - launch.command(["rpmdrake",])} - style: ButtonStyle { - label: Label { - text: qsTr("RPMdrake")+" *"; - width: slideshow.width * .35 - wrapMode: Text.WordWrap - color: "black" - } - } + 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.
"); @@ -497,20 +450,13 @@ This is a background process and you will be able to use your computer normally textFormat: Text.RichText color: "white" } - Button { - id: listApplicationsWiki + MButton { anchors.left: parent.left; anchors.leftMargin: 20 + width: slideshow.width * .35 objectName: "link" //: Translate only if the link is to a specific page for your language - 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" - } - } + onMbuttonClicked: { link.weblink(qsTr("https://wiki.mageia.org/en/List_of_applications"))} + buttonText: qsTr("List of applications (wiki)") } } Label { @@ -805,18 +751,12 @@ This is a background process and you will be able to use your computer normally color: "white" } } - Button { - x: (view.width - width)/2 - onClicked: about.open() - style: ButtonStyle { - label: Label { - horizontalAlignment: TextInput.AlignHCenter - text: qsTr("About") - color: "black" - } - } + MButton { + anchors.horizontalCenter: parent.horizontalCenter + objectName: "launch" + onMbuttonClicked: { about.open() } + buttonText: qsTr("About") } - MessageDialog { id: about title: qsTr("About Mageiawelcome") @@ -900,6 +840,10 @@ This is a background process and you will be able to use your computer normally color: "black" width: parent.width wrapMode: Text.WordWrap } + background: Rectangle { + color: "lightgrey" + radius: 5 + } } } } -- cgit v1.2.1 From c43cf5480c37f8c5217cf7700e0ddd980be73e46 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 30 Mar 2019 08:04:29 +0100 Subject: Reduce the default size (mga#24572) --- qml/mw-ui.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index e97eb41..5096be4 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -11,7 +11,7 @@ import QtQuick.Dialogs 1.1 Rectangle { id: box - width: 1000 * Screen.devicePixelRatio; height: 700 * Screen.devicePixelRatio + width: 1000 * Screen.devicePixelRatio; height: 650 * Screen.devicePixelRatio property alias view: view //: For Right to Left language, set this string to RTL -- cgit v1.2.1 From 653231531296b2854199a21a82401ec9a02cd2f1 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 13 Apr 2019 13:59:30 +0200 Subject: Correction of a link in Updates --- qml/mw-ui.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qml/mw-ui.qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 5096be4..ed1623f 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -335,7 +335,7 @@ This is a background process and you will be able to use your computer normally anchors.horizontalCenter: parent.horizontalCenter objectName: "link" //: (en) indicates that the content of the link is in English - onMbuttonClicked: { link.weblink(["drakrpm-update",])} + onMbuttonClicked: { link.weblink("https://advisories.mageia.org/")} buttonText: qsTr("Advisories of updates (en)") } -- cgit v1.2.1