mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Only show manage buttons in manage tab or detail view
Contributes to: CURA-8587
This commit is contained in:
parent
f6966c25fb
commit
1c0e484069
5 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue