|
@@ -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
|