Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2022-02-23 18:51:26 +0300
committerJaime van Kessel <nallath@gmail.com>2022-02-23 18:51:26 +0300
commit095b8dc5dd00e1fc8300e9f530b6a44018ee7277 (patch)
treeabaf67c0b6386fe49267e737b92a38bbac09bed3 /plugins/Marketplace/resources
parent6cbcf09580541c37e0156a12f8fce8fb20679825 (diff)
Show install, uninstall & disable buttons in packages list
This splits up the single show controls property into three seperate ones and no longer hides installed packages from the plugin & materials list CURA-8834
Diffstat (limited to 'plugins/Marketplace/resources')
-rw-r--r--plugins/Marketplace/resources/qml/ManagedPackages.qml5
-rw-r--r--plugins/Marketplace/resources/qml/Materials.qml3
-rw-r--r--plugins/Marketplace/resources/qml/PackageCard.qml4
-rw-r--r--plugins/Marketplace/resources/qml/PackageCardHeader.qml13
-rw-r--r--plugins/Marketplace/resources/qml/PackagePage.qml4
-rw-r--r--plugins/Marketplace/resources/qml/Packages.qml9
-rw-r--r--plugins/Marketplace/resources/qml/Plugins.qml3
7 files changed, 28 insertions, 13 deletions
diff --git a/plugins/Marketplace/resources/qml/ManagedPackages.qml b/plugins/Marketplace/resources/qml/ManagedPackages.qml
index 8ccaacea46..53b424ad23 100644
--- a/plugins/Marketplace/resources/qml/ManagedPackages.qml
+++ b/plugins/Marketplace/resources/qml/ManagedPackages.qml
@@ -19,7 +19,8 @@ Packages
bannerVisible = false;
}
searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-plugins-browser"
- packagesManageableInListView: true
-
+ showUpdateButton: true
+ showInstallButton: true
+ showDisableButton: true
model: manager.LocalPackageList
}
diff --git a/plugins/Marketplace/resources/qml/Materials.qml b/plugins/Marketplace/resources/qml/Materials.qml
index 39fae7042a..546b2072e6 100644
--- a/plugins/Marketplace/resources/qml/Materials.qml
+++ b/plugins/Marketplace/resources/qml/Materials.qml
@@ -16,7 +16,8 @@ Packages
bannerVisible = false;
}
searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/materials?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-materials-browser"
- packagesManageableInListView: false
+ showUpdateButton: true
+ showInstallButton: true
model: manager.MaterialPackageList
}
diff --git a/plugins/Marketplace/resources/qml/PackageCard.qml b/plugins/Marketplace/resources/qml/PackageCard.qml
index 633d2b25b9..58bb952a53 100644
--- a/plugins/Marketplace/resources/qml/PackageCard.qml
+++ b/plugins/Marketplace/resources/qml/PackageCard.qml
@@ -11,7 +11,9 @@ import Cura 1.6 as Cura
Rectangle
{
property alias packageData: packageCardHeader.packageData
- property alias manageableInListView: packageCardHeader.showManageButtons
+ property alias showUpdateButton: packageCardHeader.showUpdateButton
+ property alias showDisableButton: packageCardHeader.showDisableButton
+ property alias showInstallButton: packageCardHeader.showInstallButton
height: childrenRect.height
color: UM.Theme.getColor("main_background")
diff --git a/plugins/Marketplace/resources/qml/PackageCardHeader.qml b/plugins/Marketplace/resources/qml/PackageCardHeader.qml
index 3a76f7a959..7ae55249d3 100644
--- a/plugins/Marketplace/resources/qml/PackageCardHeader.qml
+++ b/plugins/Marketplace/resources/qml/PackageCardHeader.qml
@@ -12,10 +12,13 @@ import Cura 1.6 as Cura
// are combined into the reusable "PackageCardHeader" component
Item
{
- default property alias contents: contentItem.children;
+ default property alias contents: contentItem.children
property var packageData
- property bool showManageButtons: false
+ property bool showDisableButton: false
+ property bool showInstallButton: false
+ property bool showUpdateButton: false
+
width: parent.width
height: UM.Theme.getSize("card").height
@@ -157,7 +160,7 @@ Item
ManageButton
{
id: enableManageButton
- visible: showManageButtons && packageData.isInstalled && !packageData.isToBeInstalled && packageData.packageType != "material"
+ visible: showDisableButton && packageData.isInstalled && !packageData.isToBeInstalled && packageData.packageType != "material"
enabled: !packageData.busy
button_style: !packageData.isActive
@@ -171,7 +174,7 @@ Item
ManageButton
{
id: installManageButton
- visible: showManageButtons && (packageData.canDowngrade || !packageData.isBundled)
+ visible: showInstallButton && (packageData.canDowngrade || !packageData.isBundled)
enabled: !packageData.busy
busy: packageData.busy
button_style: !(packageData.isInstalled || packageData.isToBeInstalled)
@@ -201,7 +204,7 @@ Item
ManageButton
{
id: updateManageButton
- visible: showManageButtons && packageData.canUpdate
+ visible: showUpdateButton && packageData.canUpdate
enabled: !packageData.busy
busy: packageData.busy
Layout.alignment: Qt.AlignTop
diff --git a/plugins/Marketplace/resources/qml/PackagePage.qml b/plugins/Marketplace/resources/qml/PackagePage.qml
index 21c400fff2..7db380bb4b 100644
--- a/plugins/Marketplace/resources/qml/PackagePage.qml
+++ b/plugins/Marketplace/resources/qml/PackagePage.qml
@@ -31,7 +31,9 @@ Rectangle
PackageCardHeader
{
id: packageCardHeader
- showManageButtons: true
+ showUpdateButton: true
+ showInstallButton: true
+ showDisableButton: true
anchors.fill: parent
diff --git a/plugins/Marketplace/resources/qml/Packages.qml b/plugins/Marketplace/resources/qml/Packages.qml
index 194c90c248..ed48e6cd71 100644
--- a/plugins/Marketplace/resources/qml/Packages.qml
+++ b/plugins/Marketplace/resources/qml/Packages.qml
@@ -19,7 +19,10 @@ ListView
property string bannerText
property string bannerReadMoreUrl
property var onRemoveBanner
- property bool packagesManageableInListView
+
+ property bool showUpdateButton
+ property bool showDisableButton
+ property bool showInstallButton
clip: true
@@ -81,7 +84,9 @@ ListView
PackageCard
{
- manageableInListView: packages.packagesManageableInListView
+ showUpdateButton: packages.showUpdateButton
+ showDisableButton: packages.showDisableButton
+ showInstallButton: packages.showInstallButton
packageData: model.package
width: parent.width - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("narrow_margin").width
color: cardMouseArea.containsMouse ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("main_background")
diff --git a/plugins/Marketplace/resources/qml/Plugins.qml b/plugins/Marketplace/resources/qml/Plugins.qml
index 9983a827d8..37e3679e6b 100644
--- a/plugins/Marketplace/resources/qml/Plugins.qml
+++ b/plugins/Marketplace/resources/qml/Plugins.qml
@@ -16,7 +16,8 @@ Packages
bannerVisible = false;
}
searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-plugins-browser"
- packagesManageableInListView: false
+ showUpdateButton: true
+ showInstallButton: true
model: manager.PluginPackageList
}