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:
authorJelle Spijker <spijker.jelle@gmail.com>2021-12-07 13:25:16 +0300
committerJelle Spijker <spijker.jelle@gmail.com>2021-12-07 13:25:16 +0300
commit1c0e484069cfef1e6cd063684724d978506b95c6 (patch)
tree505ab176323ea7ca64d7875edc470f9994b8d306 /plugins/Marketplace/resources
parentf6966c25fb28214cedaf9ff84a22624fb013c11b (diff)
Only show manage buttons in manage tab or detail view
Contributes to: CURA-8587
Diffstat (limited to 'plugins/Marketplace/resources')
-rw-r--r--plugins/Marketplace/resources/qml/ManagedPackages.qml1
-rw-r--r--plugins/Marketplace/resources/qml/Materials.qml1
-rw-r--r--plugins/Marketplace/resources/qml/PackageCard.qml7
-rw-r--r--plugins/Marketplace/resources/qml/Packages.qml2
-rw-r--r--plugins/Marketplace/resources/qml/Plugins.qml1
5 files changed, 12 insertions, 0 deletions
diff --git a/plugins/Marketplace/resources/qml/ManagedPackages.qml b/plugins/Marketplace/resources/qml/ManagedPackages.qml
index f44fbd0a9b..dbdc04bf52 100644
--- a/plugins/Marketplace/resources/qml/ManagedPackages.qml
+++ b/plugins/Marketplace/resources/qml/ManagedPackages.qml
@@ -20,6 +20,7 @@ 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
model: Marketplace.LocalPackageList
{
diff --git a/plugins/Marketplace/resources/qml/Materials.qml b/plugins/Marketplace/resources/qml/Materials.qml
index 39d283b0a5..d19f3a4b04 100644
--- a/plugins/Marketplace/resources/qml/Materials.qml
+++ b/plugins/Marketplace/resources/qml/Materials.qml
@@ -17,6 +17,7 @@ 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
model: Marketplace.RemotePackageList
{
diff --git a/plugins/Marketplace/resources/qml/PackageCard.qml b/plugins/Marketplace/resources/qml/PackageCard.qml
index 7bfee42457..326cf0583f 100644
--- a/plugins/Marketplace/resources/qml/PackageCard.qml
+++ b/plugins/Marketplace/resources/qml/PackageCard.qml
@@ -10,8 +10,10 @@ import Cura 1.6 as Cura
Rectangle
{
+ id: root
property var packageData
property bool expanded: false
+ property bool manageableInListView
height: childrenRect.height
color: UM.Theme.getColor("main_background")
@@ -328,6 +330,7 @@ Rectangle
secondaryText: catalog.i18nc("@button", "Disable")
busySecondaryText: catalog.i18nc("@button", "Disabling...")
enabled: !(installManageButton.busy || updateManageButton.busy)
+ visible: root.manageableInListView || root.expanded
onClicked: {
if (primary_action)
@@ -351,6 +354,8 @@ Rectangle
secondaryText: catalog.i18nc("@button", "Uninstall")
busySecondaryText: catalog.i18nc("@button", "Uninstalling...")
enabled: !(enableManageButton.busy || updateManageButton.busy)
+ visible: root.manageableInListView || root.expanded
+
onClicked:
{
if (primary_action)
@@ -372,6 +377,8 @@ Rectangle
primaryText: catalog.i18nc("@button", "Update")
busyPrimaryText: catalog.i18nc("@button", "updating...")
enabled: !(installManageButton.busy || enableManageButton.busy)
+ visible: root.manageableInListView || root.expanded
+
onClicked: packageData.updatePackageTriggered(packageData.packageId)
}
}
diff --git a/plugins/Marketplace/resources/qml/Packages.qml b/plugins/Marketplace/resources/qml/Packages.qml
index c240141a71..62c0f92149 100644
--- a/plugins/Marketplace/resources/qml/Packages.qml
+++ b/plugins/Marketplace/resources/qml/Packages.qml
@@ -19,6 +19,7 @@ ListView
property string bannerText
property string bannerReadMoreUrl
property var onRemoveBanner
+ property bool packagesManageableInListView
clip: true
@@ -80,6 +81,7 @@ ListView
PackageCard
{
+ manageableInListView: packages.packagesManageableInListView
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 538afc827a..3cfa92d134 100644
--- a/plugins/Marketplace/resources/qml/Plugins.qml
+++ b/plugins/Marketplace/resources/qml/Plugins.qml
@@ -17,6 +17,7 @@ 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
model: Marketplace.RemotePackageList
{