Merge pull request #11536 from Ultimaker/CURA-8834_marketplace_packages_install_status_in_list

Show install, uninstall & disable buttons in packages list
This commit is contained in:
Casper Lamboo 2022-02-24 13:39:49 +01:00 committed by GitHub
commit 9fa6698da3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 15 deletions

View file

@ -15,7 +15,10 @@ Item
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
@ -170,7 +173,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
@ -184,7 +187,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)
@ -214,7 +217,7 @@ Item
ManageButton
{
id: updateManageButton
visible: showManageButtons && packageData.canUpdate
visible: showUpdateButton && packageData.canUpdate
enabled: !packageData.busy
busy: packageData.busy
Layout.alignment: Qt.AlignTop