Only show manage buttons in manage tab or detail view

Contributes to: CURA-8587
This commit is contained in:
Jelle Spijker 2021-12-07 11:25:16 +01:00
parent f6966c25fb
commit 1c0e484069
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
5 changed files with 12 additions and 0 deletions

View file

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